VisualStudioFeeds

All Visual Studio blogs in one place

AddThis Social Bookmark Button
Aspects have a lifetime as well as a scope just like classes in your project. Understanding this cycle is important for producing quality aspects as well as getting aspects to do what you need them to do. Today we’re going to cover the lifecycle. Aspect Lifetime So far we’ve built aspects and we’ve seen the results in action. What we haven’t seen is what happens between those two points. After the build process has been completed by MSBuild, PostSharp starts up and starts processing our aspects and aspect declarations. Aspects go through two phases, compile time
initialization and run time initialization. Note: For Silverlight, Windows Phone and .NET CF, aspects are initialized at run time and all compile time steps are skipped. Compile time One of the benefits of using PostSharp is that it initializes aspects at compile time. Any expensive work that needs to be done related to the aspect can be done at compile time instead of run time. The build process may take a hit on performance, but run time does not suffer. A new aspect instance is created for every target to which the aspect is...(Read whole news on source site)

Search

Subscribe

Enter your email address:

Delivered by FeedBurner

Increase your website traffic with Attracta.com

Contact

Email:
Subject:
Message:
Anti-spam: How many eyes has a typical person?

Follow us on FB

Home : Blog List : SharpCrafters Blog | The official blog of SharpCra : PostSharp Principles: Day 9 Aspect Lifetime & Scope Part 1