About this document
This document describes from a logical point of view the set of classes that compose PostSharp.
If you are looking for an overview of features of PostSharp, please consult the website.
The present document is completed by the class reference, which contains often much more
than trivial descriptions. Read it before saying you are lost!
Who needs to read this document
This document is for people that want to develop their own plug-ins or their own applications using the PostSharp class library.
Developers that will use plug-ins written by others do not need to understand PostSharp in details. These people will be interested by chapter Using the PostSharp Platform.
Components
PostSharp is composed of the following parts:
-
The Code Model is an object representation of .NET assemblies. In this namespace, you will find classes representing the module, the assembly manifest, types, fields, methods, exception handlers and so on. This namespace also contains classes allowing to read and write streams of IL instructions.
-
The Module Reader reads binary .NET assemblies and build an Code Model object tree that represents the initial assembly with high fidelity.
-
The Module Writer does the opposite than the Module reader: it writes back the object model to a binary assembly.
-
The Code Weaver is a facility that can inject MSIL instructions (named "advices") at specific locations (named "join points") of .NET methods.
-
The Platform Infrastructure contains the classes that make PostSharp a platform: principally the management of configuration, plug-ins and project execution.
PostSharp is composed of the following assemblies:
-
PostSharp.Public.dll should be the only library to which user applications should be linked to. It contains pure definitions of custom attributes that are instantiated in user applications. This assembly is released to the public domain to avoid any license conflict.
-
PostSharp.Core.dll contains the core functionalitity (listed here above). Note that user applications should never be linked to this assembly since it would propagate some aspects of the PostSharp license to the user application.
-
PostSharp.MSBuild.dll isthe PostSharpMSBuild task. There is no reason to link this assembly to any other.
-
PostSharp.exe is a command-line utility.