Write out method calls, parameters, and other application state to your location of choice, such as a console, a file, or a network stream. You determine whether logging is controlled by a software switch or is enabled and disabled at build time.
.NET performance monitoring tools are great, but few operate at the level of granularity that most developers require. With PostSharp, you can time the execution of critical methods and application execution paths to pinpoint performance bottlenecks at the method level.
While useful for debugging, exceptions in production can reveal sensitive application information if exposed to end users. Change exception handling and tracing behavior to track down defects in both development and production code.
Go beyond .NET: leverage PostSharp to grant or deny access to application areas using permission-based security, instead of the .NET Framework’s native role-based security.
Many regulatory agencies and standards boards require companies to keep a secure “paper trail” of who accessed what data, and when. Develop PostSharp aspects to add auditing to new or existing systems without extensive code rework.
Eliminate boring coding! Without PostSharp, INotifyPropertyChanged must be implemented or copied into every class property. Using PostSharp, however, you can implement this interface with a single attribute declaration.
Adding undo and redo functionality at the level of individual objects is easy with PostSharp: abstract this pattern out into an aspect and apply it to every class that must support backtracking.
Implement reader/writer locks on critical objects without making a hash of your business logic. Dispatch a method to a background thread or the UI thread without making a hash of your business logic.
Of all the programmatic tasks that lay before developers, ensuring that threads do not race to access the same resources is one of the most bedeviling. PostSharp enables adding lock to methods and fields without making a hash of your business logic.
Just because .NET doesn’t support COM+-style declarative transactions doesn’t meant your application shouldn’t! Add robust, consistent support for transactions across your app with aspects.
Intercept read/write operations using aspects to customize object persistence behavior.