Classes
AdviceArgs
Base class for arguments of all advices.
Arguments
Encapsulation of method arguments.
Aspect
Base class for all aspects that are declared using multicast custom attributes (MulticastAttribute).
AspectDescriptionAttribute
Custom attribute that, when applied to an aspect class, specifies a human-readable description of the aspect that can be displayed in PostSharp Tools for Visual Studio.
AspectInfo
Reserved for future usage.
AspectInstance
Completely specifies an aspect instance, including its target code element. An AspectInstance contains either the aspect instance itself (Aspect property), either information allowing to construct the aspect (AspectConstruction) and configure the weaver (AspectConfiguration).
AspectSpecification
Completely specifies an aspect instance (but not its target). An AspectSpecification either the aspect instance itself (Aspect property), either information allowing to construct the aspect (AspectConstruction) and configure the weaver (AspectConfiguration).
AspectUtilities
Utility methods for PostSharp.Aspects
.
AssemblyLevelAspect
Base class for all aspects applied on assemblies.
CompositionAspect
Aspect that, when applied on a type, introduces one or many new interfaces into that type.
CustomAttributeIntroductionAspect
Aspect that, when applied to a target, adds a custom attribute to this target.
EventInterceptionArgs
Arguments of handlers of aspects of the type EventInterceptionAspect.
EventInterceptionAspect
Aspect that, when applied on an event, intercepts invocations of its semantics Add
(OnAddHandler(EventInterceptionArgs)),
Remove
(OnRemoveHandler(EventInterceptionArgs)) and Invoke
(OnInvokeHandler(EventInterceptionArgs)).
EventLevelAspect
Base class for all aspects applied on events.
FieldLevelAspect
Base class for all aspects applied on fields.
InstanceLevelAspect
Base class for aspects applied on types, but having the same lifetime as instances of the type to which they are applied.
LinesOfCodeAvoidedAttribute
Custom attribute that, when applied to an aspect class, specifies how many manual lines of code are avoided every time the aspect is being used.
LocationBindingExtensions
Extension methods for the ILocationBinding interface.
LocationInitializationArgs
Represents information about a location that has just been initialized. Used in OnInstanceLocationInitialized(LocationInitializationArgs).
LocationInterceptionArgs
Arguments of advices of aspect type LocationInterceptionAspect.
LocationInterceptionAspect
Aspect that, when applied on a location (field or property), intercepts invocations of
the Get
(OnGetValue(LocationInterceptionArgs)) and Set
(OnSetValue(LocationInterceptionArgs)) semantics.
LocationLevelAspect
Base class for aspects defined in fields, properties, or parameters.
ManagedResourceIntroductionAspect
Aspect that, when applied to an assembly, adds a custom attribute to this assembly.
MethodExecutionArgs
Arguments of advices of aspects of type OnMethodBoundaryAspect and OnExceptionAspect
MethodImplementationAspect
Aspect that, when applied on an abstract or extern
method, creates an implementation for this method.
MethodInterceptionArgs
Arguments of advices of aspect type MethodInterceptionAspect.
MethodInterceptionAspect
Aspect that, when applied on a method, intercepts invocations of this method.
MethodLevelAspect
Base class for all aspects applied on methods.
ModuleInitializerAttribute
Custom attribute that, when added to a static method, causes the method to be executed immediately after the assembly is loaded by the CLR. The target method must be public, parameterless, void, and non-generic.
NullTaskSentinel
The singleton instance of this class is assigned to the ReturnValue property when an OnMethodBoundaryAspect aspect is applied semantically to a method and the target method returns a null task.
OnExceptionAspect
Aspect that, when applied to a method, defines an exception handler around the whole method and calls a custom method in this exception handler.
OnMethodBoundaryAspect
Aspect that, when applied to a method defined in the current assembly, inserts a piece of code before and after the body of these methods.
TypeIdentity
Wraps a Type or a type name.
TypeLevelAspect
Base class for all aspects applied on types.
Structs
AsyncCallId
Identifier of an asynchronous method invocation, i.e. of a unique async state machine instance.
ConstructorDepth
System type used in the implementation of the OnInstanceConstructedAdvice. Do not use in user code.
MethodBindingInvokeAwaitable
Represents the awaitable result of the asynchronous method invocation.
Await this value to get the System.Object
instance containing the return value of the async method.
The result of the await is null
for async methods that do not return any value.
MethodBindingInvokeAwaiter
Represents the awaiter for the result of the asynchronous method invocation.
MethodInterceptionProceedAwaitable
Represents the asynchronous proceed operation that calls the next node in the chain of invocation.
MethodInterceptionProceedAwaiter
Represents the awaiter for the completion of the asynchronous proceed operation.
Interfaces
IAspect
Base interface for run-time semantics of all aspects.
IAspectBuildSemantics
Compile-time semantics of IAspect.
IAspectInstance
Represents an instance of an aspect applied to a declaration.
IAspectProvider
Interface that, when implemented by an aspect class, allows aspect instances to provide other aspects to the weaver.
IAspectRepositoryService
Service that allows to determine which aspects have been applied to a given declaration, whether declaratively through custom attributes or MulticastAttribute, or programmatically using IAspectProvider.
IAssemblyLevelAspect
Runtime semantics of aspects applied at assembly level.
IAssemblyLevelAspectBuildSemantics
Build-time semantics of aspects applied at assembly level.
IAsyncMethodBinding
Interface through which a method-level aspect or advice can asynchronously invoke the next node in the chain of invocation.
IAsyncMethodInterceptionAspect
Runtime semantics of an aspect that, when applied on a method, intercepts invocations of this method. Includes semantics for both async and non-async method interception.
ICloneAwareAspect
Defines the semantics of aspects that require to be notified after a target object is cloned using MemberwiseClone().
ICompositionAspect
Defines the semantics of an aspect that, when applied on a type, introduce one or many new interfaces into that type, and let these interfaces be implemented by an object created at runtime.
ICustomAttributeIntroductionAspect
Semantics of an aspect that, when applied to a target, adds a custom attribute to this target.
IEventBinding
Interface through which an event-level aspect or advice can invoke the next node in the chain of invocation.
IEventInterceptionAspect
Runtime semantics of an aspect that, when applied on an event, intercepts invocations of its semantics Add
(OnAddHandler(EventInterceptionArgs)),
Remove
(OnRemoveHandler(EventInterceptionArgs)) and Invoke
(OnInvokeHandler(EventInterceptionArgs)) semantics.
IEventLevelAspect
Runtime semantics of aspects that can be applied on events.
IEventLevelAspectBuildSemantics
Build-time semantics of aspects that can be applied on events.
IFieldLevelAspect
Run-time semantics of aspects applied to fields.
IFieldLevelAspectBuildSemantics
Compile-time semantics of IFieldLevelAspect.
IInstanceScopedAspect
Runtime semantics of aspects that have the same lifetime as instance of types to which their are applied (or instance of the declaring type of members to which they are applied).
ILocationBinding
Interface through which a field- or property-level aspect or advice can invoke the next node in the chain of invocation.
ILocationBindingAction<TPayload>
Exposes an Execute<TValue>(ILocationBinding<TValue>, ref TPayload) method invoked by the Execute<TPayload>(ILocationBindingAction<TPayload>, ref TPayload) method, which allows to execute strongly-typed operations and avoid boxing required by the weakly typed ILocationBinding interface.
ILocationBinding<T>
A strongly-typed variant for ILocationBinding.
ILocationInterceptionArgs
An interface for LocationInterceptionArgs.
ILocationInterceptionArgsAction<TPayload>
Exposes an Execute<TValue>(ILocationInterceptionArgs<TValue>, ref TPayload) method invoked by the Execute<TPayload>(ILocationInterceptionArgsAction<TPayload>, ref TPayload) method, which allows to execute strongly-typed operations and avoid boxing required by the weakly typed ILocationInterceptionArgs interface.
ILocationInterceptionArgs<T>
A strongly-typed specialization of the ILocationInterceptionArgs interface.
ILocationInterceptionAspect
Runtime semantics of an aspect that, when applied on a location (field or property), intercepts invocations of
the Get
(OnGetValue(LocationInterceptionArgs)) and Set
(OnSetValue(LocationInterceptionArgs)) semantics.
ILocationLevelAspect
Runtime semantics of aspects defined on a field, property, or parameter.
ILocationLevelAspectBuildSemantics
Compile-time semantics of ILocationLevelAspect.
ILocationValidationAspect
Ancestor of ILocationValidationAspect<T>.
ILocationValidationAspect<T>
Runtime semantics of an aspect that, when applied on a location (field, property, or parameter), validates the value assigned to this location using method ValidateValue(T, string, LocationKind, LocationValidationContext), and throws the exception returned by this method if any.
IManagedResourceIntroductionAspect
Semantics of an aspect that, when applied to an assembly, adds a managed resource to this assembly.
IMethodBinding
Interface through which a method-level aspect or advice can invoke the next node in the chain of invocation.
IMethodInterceptionAspect
Runtime semantics of an aspect that, when applied on a method, intercepts invocations of this method.
IMethodLevelAspect
Runtime semantics of aspects applied to methods.
IMethodLevelAspectBuildSemantics
Compile-time semantics of IMethodLevelAspect.
IOnExceptionAspect
Runtime semantics of an aspect that, when applied on a method, defines an exception handler around the whole method body and lets the implementation of this interface handle the exception.
IOnInstanceLocationInitializedAspect
Contains the signature of OnInstanceLocationInitialized(LocationInitializationArgs), a location-level advice.
IOnMethodBoundaryAspect
Runtime semantics of OnMethodBoundaryAspect.
IOnStateMachineBoundaryAspect
Extends the IOnMethodBoundaryAspect interface with two advises to be applied on state machines.
ITypeLevelAspect
Run-time semantics of aspects applied to types.
ITypeLevelAspectBuildSemantics
Compile-time semantics of ITypeLevelAspect.
Enums
FlowBehavior
Enumerates the possible behaviors of the calling method after the calling method has returned.
LocationValidationContext
Enumerates the possible contexts in which the location validation advices can be invoked.
SemanticallyAdvisedMethodKinds
Enumerates possible target methods for semantic advising.
UnsupportedTargetAction
Enumerates actions that can be taken when an aspect is applied to a target element that is not currently supported.