DANIEL VAUGHAN

Project Metadata Generation Using T4

03 Sep 2009

This article is an elaboration of my previous experimentation with T4 (Text Template Transformation Toolkit) and describes how to use T4, which is built into Visual Studio 2008, and the Visual Studio automation object model API, to generate member and type information for an entire project. Generated metadata can then be applied to such things as dispensing with string literals in XAML binding expressions and overcoming the INotifyPropertyChanged property name string code smell, or indeed...

Read more


A Project Metadata Generator For Visual Studio Using T4

15 Aug 2009

I am rather excited to share with you something that I have been working on in my spare time for the last couple of days. I have used T4 to build a metadata generator for your Silverlight and Desktop CLR projects. It can be used as a replacement for static reflection (expression trees), reflection (walking the stack), and various other means for deriving the name of a property, method, or field. There has been much...

Read more


Property Change Notification Using A Weak Referencing Strategy

02 Aug 2009

Features Desktop and Silverlight CLR compatibility Capability to perform assignment and raise appropriate events before and after assignment. Weak referenced Provides for both expression tree and loosely typed strings Uses extended EventArgs to supply before and after values Extended PropertyChangingEventArgs for cancellable changes Configurable to use caching of EventArgs to decrease heap fragmentation Comes with unit tests for Desktop and Silverlight CLRs Introduction INotifyPropertyChanged is a ubiquitous part of Silverlight and WPF programming. It is...

Read more


Transparent Wcf Channel Management With Unity

30 Jul 2009

Introduction It is generally considered good form to define a separate ServiceContract interface for all WCF services. By doing so, it decouples the contract from the implementation. Still, if we consume a service contract via conventional means such as generating a proxy using a ChannelFactory or using a ServiceReference generated proxy, we couple the service with the WCF infrastructure. So what could be wrong with that? Well, say if we have a local version of...

Read more


A Location Agnostic Message Service

15 Jun 2009

When developing an application, clearly it’s prudent to have uniformity in the manner certain tasks are carried out, thereby avoiding violation of the DRY principle. An example of this is displaying common dialog boxes. But wait, if you think this post is just going to be about an abstracted dialog box system, then think again. While Calcium does provide a common dialog system, it also allows us to display a dialog to the user from...

Read more