Silverlight Sample

Open this sample in Visual Studio

The PostSharp.Samples.Silverlight contains three aspects that can be applied on projects targeting Silverlight 2:

Aspects are defined in the project PostSharp.Samples.Silverlight.Aspects and applied to the project PostSharp.Samples.Silverlight.Test. These projects reference the assemblies PostSharp.Public.SL.dll and PostSharp.Laos.SL.dll

NotifyPropertyChangedAttribute is the only non-trivial aspect. Since it requires code to be executed at build time, it is implemented as an external aspect. Indeed, the NotifyPropertyChangedAttribute class contains no implementation. The aspect is implemented in another project, PostSharp.Samples.Silverlight.Impl, which is not a Silverlight class library but is linked to the full .NET Framework.