PostSharpIntroductionHow to Learn Post­SharpDeveloper Role: Using Aspects
Open sandboxFocusImprove this doc

Developer Role: Using Aspects

Using aspects requires much less training than creating new ones. In typical large teams, only a few developers or architects develop new aspects, while the rest of the team uses existing aspects. This section focuses on the skill set that you need to acquire if you have to be able to use PostSharp aspects but don't need to create your own.

In this session, we also assume that PostSharp has been properly deployed into your development and build environments.

Note

Of course, you can learn PostSharp as much as you want. The role of this section is to provide a short list of articles to minimize your learning curve and get you productive as quickly as possible, but this should not stop you from learning and experimenting more.

Installing and upgrading PostSharp

Every process has a starting point. Learn how to add PostSharp to your project so that you can get started with improving your codebase.

Topic Articles
Install PostSharp to your machine Requirements and Compatibility
Installing PostSharp Tools for Visual Studio
Add PostSharp to a project and keep it up-to-date Installing PostSharp Into a Project
Upgrading from a Previous Version of PostSharp

Working with pre-built patterns

PostSharp offers a number of different pre-built patterns. You will need to learn those that will be used in your application.

Topic Articles
Diagnostics Logging
Code Contracts Contracts
INotifyPropertyChanged INotifyPropertyChanged
Aggregatable Parent/Child, Visitor and Disposable
Disposable Automatically Disposing Children Objects (Disposable)
Undo and Redo Undo/Redo
Threading Models Writing Thread-Safe Code with Threading Models
Freezable Threading Model, Immutable Threading Model, Actor Threading Model, Reader/Writer Synchronized Threading Model, Synchronized Threading Model, Thread-Unsafe Threading Model, Thread Affine Threading Model
Compatibility of Threading Models
Opting In and Out From Thread Safety
Dispatching Threads Dispatching a Method to the UI Thread
Dispatching a Method to Background
Architecture Validation Restricting Interface Implementation
Controlling Component Visibility Beyond Private and Internal

Working with Patterns

The following resources are for all aspects. You can save a great amount of time in learning to master them.

Topic Articles
Adding aspects to several declarations Adding Aspects Declaratively Using Attributes
Resolving Errors Working with Errors, Warnings, and Messages