Wow! What a turnout for my first webinar! Thank you all for attending, I had a great time presenting it, and will continue to do more webinars in the future. The webinar was recorded, and the video is now online for your viewing:

As promised, here are the answers to the great questions you asked, which I didn’t have the chance to answer during the live webinar. As always, you can always ask your questions on our Support Forums.

Q: Any reason the [aspect] class must be Serializable?

A: At (post) compilation, the aspect is serialized using binary serialization, and added as a resource to the target process. Then at runtime, the aspect is deserialized. PostSharp will emit a compilation error if you forget to mark your aspect as Serializable.

Q: What is the typical use case for creating interfaces using PostSharp?

A: One typical scenario for implementing interfaces with PostSharp is implementing INotifyPropertyChanged in WPF to support Data Binding.

Q: Are the OnExit and OnEnter aspects thread safe? How would one make it thread safe if it is not?

A: While the aspects themselves are thread-safe, shared state (i.e. custom fields) within the aspects is not. To safely pass data around between OnEnter and OnExit events, you can use the MethodExecutionArgs.MethodExecutionTag property.

Q: What about signed DLLs and PostSharp?

A: PostSharp has no problems with signed DLLs – they will be re-signed after the post-compilation process.

Q: What about Silverlight DLL's, is it also available?

A: Of course, PostSharp comes with the Silverlight assemblies included, you need to add a reference to the PostSharp.SL.dll instead of PostSharp.dll. For more information, please refer to the online documentation.

Q: Can you provide a good definition of aspect oriented programming?

A: Aspect Oriented Programming complements traditional OOP by allowing us to encapsulate infrastructure code (such as logging, security, validation, etc.) into small modules called aspects, and then apply those aspects throughout the entire system in such way that the business logic is completely separated from those concerns.

So go ahead, download the free starter edition now!

Happy PostSharping!


Comments (4) -

Diego Correa
Diego Correa
1/27/2012 7:02:58 PM #

Great Q&A section, that is very very interesting. Also, in the future would be interesting this type of section to add questions about the infrastructure and the usability of PostSharp.

I have a doubt in the first answer "and added as a resource to the target process", in this context what is the target process?

Thanks and Congratulations.

Igal Tabachnik
Igal Tabachnik
1/28/2012 5:46:06 PM #

Hello Diego, thanks very much for the feedback.

To clarify, the target process is of course your application code. The aspects are being added to it during compilation.


2/3/2012 7:57:11 AM #

Did you already draw and announce the winners of the free PostSharp licenses?

Diego Correa
Diego Correa
2/3/2012 1:07:58 PM #

Thanks Igal. We hope another webinar to enjoy again soon.

Kind regards.

Comments are closed