DANIEL VAUGHAN

Calling Web Services From Silverlight As The Browser Is Closed

19 Oct 2009

Introduction Today I was reading an excellent post by my fellow Disciple Laurent Bugnion, which led on to a short discussion about performing actions after a user attempts to close a browser window. It got me thinking about the capability to dispatch a web service call in Silverlight just after a user attempts to close the browser window or navigate elsewhere. I have been asked the question before, yet before now, have not attempted to...

Read more


App.config Type String Verification With Msbuild

19 Oct 2009

Nicolas Dorier and I have posted a new article on verifying type string names in app.config files using MSBuild. The App.Config Type verifier is a custom MSBuild task. It examines your app.config file at compile time and verifies that string type names are resolvable. To demonstrate, let’s take a look at a simple example. The following is an excerpt from an app.config file. <configuration> <configSections> <section name="name1" type="Foo.BahType, Foo"/> </configSections> </configuration> Here we have a...

Read more


XAML Resources Without String Literals.aspx

03 Oct 2009

Introduction Since my initial experimentation with generating project metadata data using T4 (Text Template Transformation Toolkit), there have been several obvious opportunities to expand its scope. One such opportunity has been to use T4 to generate static properties representing XAML keys. This serves to reduce the reliance on string literals when referencing resources. I have subsequently augmented my MetadataGeneration.tt template to do just that. x:Key Property Generation To demonstrate, I have updated the sample application...

Read more


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