Open sandboxFocus
  • TOC

Post­Sharp Documentation

Introduction

Deployment and Configuration

Adding Aspects to Code

Logging

Contracts

INotify­Property­Changed

Weak Event

XAML

Parent/Child, Visitor and Disposable

Undo/Redo

Caching

Multithreading

Developing Custom Aspects

Validating Architecture

Testing and Debugging

Miscellaneous

API Reference

Post­Sharp

Post­Sharp.​Aspects

Post­Sharp.​Aspects.​Advices

Post­Sharp.​Aspects.​Configuration

Post­Sharp.​Aspects.​Dependencies

Post­Sharp.​Aspects.​Internals

Post­Sharp.​Aspects.​Serialization

Post­Sharp.​Collections

Post­Sharp.​Constraints

Post­Sharp.​Extensibility

Post­Sharp.​Extensibility.​Build­Time­Logging

Post­Sharp.​Patterns

Post­Sharp.​Patterns.​Caching

Post­Sharp.​Patterns.​Caching.​Backends

Post­Sharp.​Patterns.​Caching.​Backends.​Azure

Post­Sharp.​Patterns.​Caching.​Backends.​Redis

Post­Sharp.​Patterns.​Caching.​Dependencies

Post­Sharp.​Patterns.​Caching.​Formatters

Post­Sharp.​Patterns.​Caching.​Implementation

Post­Sharp.​Patterns.​Caching.​Locking

Post­Sharp.​Patterns.​Caching.​Serializers

Post­Sharp.​Patterns.​Caching.​Value­Adapters

Post­Sharp.​Patterns.​Collections

Post­Sharp.​Patterns.​Collections.​Advices

Post­Sharp.​Patterns.​Contracts

Post­Sharp.​Patterns.​Diagnostics

Post­Sharp.​Patterns.​Diagnostics.​Adapters.​Asp­Net­Core

Post­Sharp.​Patterns.​Diagnostics.​Adapters.​Asp­Net­Framework

Post­Sharp.​Patterns.​Diagnostics.​Adapters.​Diagnostic­Source

Post­Sharp.​Patterns.​Diagnostics.​Adapters.​Http­Client

Post­Sharp.​Patterns.​Diagnostics.​Audit

Post­Sharp.​Patterns.​Diagnostics.​Backends

Post­Sharp.​Patterns.​Diagnostics.​Backends.​Application­Insights

Post­Sharp.​Patterns.​Diagnostics.​Backends.​Audit

Post­Sharp.​Patterns.​Diagnostics.​Backends.​Common­Logging

Post­Sharp.​Patterns.​Diagnostics.​Backends.​Console

Post­Sharp.​Patterns.​Diagnostics.​Backends.​Event­Source

Post­Sharp.​Patterns.​Diagnostics.​Backends.​Log4Net

Post­Sharp.​Patterns.​Diagnostics.​Backends.​Microsoft

Post­Sharp.​Patterns.​Diagnostics.​Backends.​Multiplexer

Post­Sharp.​Patterns.​Diagnostics.​Backends.​NLog

Post­Sharp.​Patterns.​Diagnostics.​Backends.​Null

Post­Sharp.​Patterns.​Diagnostics.​Backends.​Serilog

Post­Sharp.​Patterns.​Diagnostics.​Backends.​Trace

Post­Sharp.​Patterns.​Diagnostics.​Backends.​Trace­Source

Post­Sharp.​Patterns.​Diagnostics.​Contexts

Post­Sharp.​Patterns.​Diagnostics.​Correlation

Post­Sharp.​Patterns.​Diagnostics.​Custom

Post­Sharp.​Patterns.​Diagnostics.​Custom.​Messages

Post­Sharp.​Patterns.​Diagnostics.​Formatters

Post­Sharp.​Patterns.​Diagnostics.​Record­Builders

Post­Sharp.​Patterns.​Diagnostics.​Threading­Instrumentation

Post­Sharp.​Patterns.​Diagnostics.​Transactions

Post­Sharp.​Patterns.​Diagnostics.​Transactions.​Model

Post­Sharp.​Patterns.​Dynamic­Advising

Post­Sharp.​Patterns.​Formatters

Post­Sharp.​Patterns.​Model

Post­Sharp.​Patterns.​Model.​Controls

Post­Sharp.​Patterns.​Model.​Type­Adapters

Post­Sharp.​Patterns.​Recording

Post­Sharp.​Patterns.​Recording.​Operations

Post­Sharp.​Patterns.​Threading

Post­Sharp.​Patterns.​Threading.​Models

Post­Sharp.​Patterns.​Utilities

Post­Sharp.​Patterns.​Xaml

Post­Sharp.​Reflection

Post­Sharp.​Reflection.​Method­Body

Post­Sharp.​Serialization

  • Article

Namespace PostSharp.Extensibility

Classes

AssemblyIdAttribute

Assigns a unique identifier to an assembly. This assembly identifier is used to generate unique attribute identifiers.

EscalatePostSharpMessageAttribute

Custom attribute that, when applied on an assembly, means that a given message should be escalated to an error during the current PostSharp session.

HasInheritedAttributeAttribute

Internal Only. Custom attribute used internally by PostSharp to mark elements having inherited custom attributes. This custom attribute should not be used in custom code, otherwise PostSharp may not work properly.

ImplementationBoundAttributeAttribute

Custom attribute meaning that custom attributes of a given type are bound to the implementation, not to the semantics.

InvalidAnnotationException

Exception thrown at build time by implementation of CompileTimeValidate(object) when an annotation is invalid.

Message

Encapsulates a message (error, warning, info, ...).

MessageDispenser

Provides a base implementation of IMessageDispenser where the message key is supposed to be in format PRE0000, where PRE is a prefix and 0000 is an integer. Keys for help URLs have the format PRE0000?.

MessageException

Exception embedding a Message.

MessageLocation

Represents the location of a message, which means, for the end-user, a line in a file of source code. From the aspect developer, the location can be known as an object representing an element of code (for instance a Type or MethodInfo). Such implicit locations are resolved by PostSharp to a file and line number.

MessageSource

Provides commodity methods to work with an IMessageSink.

MetricAttribute

Custom attribute that, when applied on an aspect, causes the aspect to increment some metric at build time.

MulticastAttribute

Custom attribute that can be applied to multiple elements using wildcards.

MulticastAttributeUsageAttribute

Custom attribute that determines the usage of a MulticastAttribute.

PostSharpEnvironment

Provides access to the current PostSharp environment (IPostSharpEnvironment).

ProjectExtensionElement

Represents a custom element (or section) in the XML project type.

RequirePostSharpAttribute

Custom attribute that, when applied on another custom attribute (a class derived from Attribute), means that assemblies with elements annotated with that custom attribute should be processed by PostSharp.

SuppressAnnotationValidationAttribute

Instructs PostSharp that the validation of IValidableAnnotation is done by another component, and should not be processed by the default component.

SuppressWarningAttribute

Instructs PostSharp to ignore warnings and information messages. Errors cannot be ignored.

Interfaces

ICompatibilityLevelService

Exposes the PostSharp version with which the current version of PostSharp should be backward compatible.

IFormattingService

Provides a service similar to Format(string, params object[]), but uses the same formatter as the one used by PostSharp for error messages. This formatter does a better job at formatting objects like Type or MethodInfo.

IMessageDispenser

Gets a text given its key.

IMessageLocationResolver

Provides a method that returns the file and line where a declaration (such as a Type or MethodInfo) is declared.

IMessageSink

Receives messages.

IPostSharpEnvironment

Provides information about the current PostSharp environment.

IProject

Provides information about the currently executing project.

IReflectionBindingManagerService

Exposes the ResolveAssembly(Type) method, which gets the reference identity of the assembly declaring a given type.

IService

A service exposed by the build-time part of PostSharp.

IServiceLocator

Exposes build-time services.

IStateStore

A context that provides storage for arbitrary items.

IValidableAnnotation

Interface that, when implemented by a custom attribute (Attribute), causes PostSharp to invoke a validation method for every instance of that custom attribute.

IWeavingSymbolsService

Service that allows build-time code to push annotations (both programmatic and user-visible) to PostSharp Tools for Visual Studio.

Enums

BindingContext

Enumeration of contexts in which assemblies can be loaded.

MulticastAttributes

Attributes of elements to which multicast custom attributes (MulticastAttribute) apply.

MulticastInheritance

Kind of inheritance of MulticastAttribute.

MulticastTargets

Kinds of targets to which multicast custom attributes (MulticastAttribute) can apply.

SeverityType

Types of message severities.