PostSharp.Aspects.Advices Namespace

Advice Class

AdviceInstance Class

AspectInitializationReason Enumeration

CopyCustomAttributesAttribute Class

CustomAttributeOverrideAction Enumeration

Event(TDelegate) Class

EventAccessor(TDelegate) Delegate

GroupingAdvice Class

IAdviceProvider Interface

ImportLocationAdviceInstance Class

ImportMemberAdviceInstance Class

ImportMemberAttribute Class

ImportMemberOrder Enumeration

ImportMethodAdviceInstance Class

InitializeAspectInstanceAdvice Class

InterfaceOverrideAction Enumeration

IntroduceInterfaceAdviceInstance Class

IntroduceInterfaceAttribute Class

IntroduceMemberAdviceInstance Class

IntroduceMemberAttribute Class

IntroduceMethodAdviceInstance Class

IProperty Interface

LocationValidationAdvice Class

MemberOverrideAction Enumeration

MethodPointcut Class

MulticastPointcut Class

OnAspectsInitializedAdvice Class

OnEventAddHandlerAdvice Class

OnEventInvokeHandlerAdvice Class

OnEventRemoveHandlerAdvice Class

OnInstanceConstructedAdvice Class

OnLocationGetValueAdvice Class

OnLocationSetValueAdvice Class

OnMethodBoundaryAdvice Class

OnMethodEntryAdvice Class

OnMethodExceptionAdvice Class

OnMethodExitAdvice Class

OnMethodInvokeAdvice Class

OnMethodInvokeAsyncAdvice Class

OnMethodInvokeBaseAdvice Class

OnMethodResumeAdvice Class

OnMethodSuccessAdvice Class

OnMethodYieldAdvice Class

Pointcut Class

Property(TValue) Class

Property(TValue, TIndex) Class

PropertyGetter(TValue) Delegate

PropertyGetter(TValue, TIndex) Delegate

PropertySetter(TValue) Delegate

PropertySetter(TValue, TIndex) Delegate

SelfPointcut Class

SignaturePointcut Class

This is the online documentation for PostSharp 5.0.
Download PDF or CHM. Go to v4.3 or v5.0

PostSharp.Aspects.Advices Namespace

The PostSharp.Aspects.Advices provides custom attributes that allow developing composite aspects with advices and pointcuts.
Classes
  ClassDescription
Public classAdvice
Base class for all custom attributes representing an advice.
Public classAdviceInstance
Base class for advice instances, which can be provided dynamically by the aspect thanks to the IAdviceProvider interface.
Public classCopyCustomAttributesAttribute
Custom attribute that, when applied on an aspect class, requires custom attributes present on the aspect class to be copied to the target of this class. When applied on an introduced member (see IntroduceMemberAttribute), this custom attribute requires custom attributes present on the aspect member to be copied to the introduced member.
Public classEvent<TDelegate>
Exposes the semantics of an event for use with the ImportMemberAttribute aspect extension.
Public classGroupingAdvice
Base class for all advices that are possibly composed of multiple advices that can be grouped together using the Master property.
Public classImportLocationAdviceInstance
Represents an advice that imports a field or property (represented by a LocationInfo) of the target class into a field of the aspect class. This class is the imperative equivalent of the ImportMemberAttribute declarative advise.
Public classImportMemberAdviceInstance
Public classImportMemberAttribute
Custom attribute that, when applied to an instance field of an aspect class, determines that this field should be bound to a method, event or property, of the target class of this aspect. Valid types for fields are a concrete Delegate (to bind to a method), Property<TValue> or Property<TValue, TIndex> (to bind to a property), or Event<TDelegate> (to bind to an event).
Public classImportMethodAdviceInstance
Represents an advises that import a method of the target class into the aspect class.
Public classInitializeAspectInstanceAdvice
Custom attribute that, when applied to a method of an aspect class, specifies that this method should be invoked whenever the aspect instance needs to be initialized. The target method must have a void return value and have a single parameter of type AspectInitializationReason. This method is equivalent to RuntimeInitializeInstance()
Public classIntroduceInterfaceAdviceInstance
Represents an advise that introduces an interface into the target class. The interface must be implemented by the aspect class.
Public classIntroduceInterfaceAttribute
Custom attribute that, when applied to an aspect class, specifies that the aspect should introduce a given interface into the type to which the aspect is applied.
Public classIntroduceMemberAdviceInstance
Public classIntroduceMemberAttribute
Custom attribute that, when applied on a method, event or property of an aspect class, specifies that this method, event or property should be introduced into the types to which the aspect is applied.
Public classIntroduceMethodAdviceInstance
Represents an advice that introduces a method of the aspect class into the target class.
Public classLocationValidationAdvice
Custom attribute that, when applied on a method of an aspect class, specifies that this method has the same semantic as the ValidateValue(T, String, LocationKind, LocationValidationContext) method of the ILocationValidationAspect<T> interface.
Public classMethodPointcut
Custom attribute that, when applied on an advice method, specifies the name of the method that will be invoked at build-time to return the set of elements of code to which the advice applies.
Public classMulticastPointcut
Custom attribute that, when applied on an advice method, specifies to which elements of code this advice applies, based on the kind, name and attributes of code elements. Works similarly as MulticastAttribute.
Public classOnAspectsInitializedAdvice
Custom attribute that, when applied to a method of an aspect class, specifies that this method should be invoked after the instances of all the aspects applied on the same target has been initialized. The target method must have a void return value and have a single parameter of type AspectInitializationReason.
Public classOnEventAddHandlerAdvice
Custom attribute that, when applied on a method of an aspect class, specifies that this method is an advice having the same semantics as OnAddHandler(EventInterceptionArgs).
Public classOnEventInvokeHandlerAdvice
Custom attribute that, when applied on a method of an aspect class, specifies that this method is an advice having the same semantics as OnInvokeHandler(EventInterceptionArgs).
Public classOnEventRemoveHandlerAdvice
Custom attribute that, when applied on a method of an aspect class, specifies that this method is an advice having the same semantics as OnRemoveHandler(EventInterceptionArgs).
Public classOnInstanceConstructedAdvice
Custom attribute that, when applied to a method of an aspect implementing , specifies that this method should be executed after the last instance constructor of the target class of the aspect has completed execution. That is, this method will be invoked when the target object will be fully constructed. This custom attribute can be applied only on methods that have void return type and accepts no parameter.
Public classOnLocationGetValueAdvice
Custom attribute that, when applied on a method of an aspect class, specifies that this method is an advice having the same semantics as OnGetValue(LocationInterceptionArgs).
Public classOnLocationSetValueAdvice
Custom attribute that, when applied on a method of an aspect class, specifies that this method is an advice having the same semantics as OnSetValue(LocationInterceptionArgs).
Public classOnMethodBoundaryAdvice
Public classOnMethodEntryAdvice
Custom attribute that, when applied on a method of an aspect class, specifies that this method is an advice having the same semantics as OnEntry(MethodExecutionArgs).
Public classOnMethodExceptionAdvice
Custom attribute that, when applied on a method of an aspect class, specifies that this method is an advice having the same semantics as OnException(MethodExecutionArgs).
Public classOnMethodExitAdvice
Custom attribute that, when applied on a method of an aspect class, specifies that this method is an advice having the same semantics as OnExit(MethodExecutionArgs).
Public classOnMethodInvokeAdvice
Custom attribute that, when applied on a method of an aspect class, specifies that this method is an advice having the same semantics as OnInvoke(MethodInterceptionArgs).
Public classOnMethodInvokeAsyncAdvice
Custom attribute that, when applied on a method of an aspect class, specifies that this method is an advice having the same semantics as OnInvokeAsync(MethodInterceptionArgs).
Public classOnMethodInvokeBaseAdvice
The base class for method interception advices.
Public classOnMethodResumeAdvice
Custom attribute that, when applied on a method of an aspect class, specifies that this method is an advice having the same semantics as OnResume(MethodExecutionArgs).
Public classOnMethodSuccessAdvice
Custom attribute that, when applied on a method of an aspect class, specifies that this method is an advice having the same semantics as OnSuccess(MethodExecutionArgs).
Public classOnMethodYieldAdvice
Custom attribute that, when applied on a method of an aspect class, specifies that this method is an advice having the same semantics as OnYield(MethodExecutionArgs).
Public classPointcut
Custom attribute, typically accompanying an advice, specifying to which code elements the advice applies.
Public classProperty<TValue>
Exposes the semantics of a parameterless property for use with the ImportMemberAttribute aspect extension.
Public classProperty<TValue, TIndex>
Mimics the semantics of a property accepting a single index parameter, for use with the ImportMemberAttribute aspect extension.
Public classSelfPointcut
Pointcut that selects exactly the aspect target.
Public classSignaturePointcut
A Pointcut that matches target methods by name and signature. This works only with non-generic methods.
Interfaces
  InterfaceDescription
Public interfaceIAdviceProvider
Interface that allows an aspect to provide aspects dynamically, instead of declaratively using custom attributes.
Public interfaceIProperty
A weakly-typed interface for the class.
Delegates
  DelegateDescription
Public delegateEventAccessor<TDelegate>
Defines the signature of methods implementing the Add and Remove semantics of an event.
Public delegatePropertyGetter<TValue>
Defines the signature of methods implementing the Get semantic of a parameterless property.
Public delegatePropertyGetter<TValue, TIndex>
Defines the signature of methods implementing the Get semantic of a property with a single index parameter.
Public delegatePropertySetter<TValue>
Defines the signature of methods implementing the Set semantic of a parameterless property.
Public delegatePropertySetter<TValue, TIndex>
Defines the signature of methods implementing the Set semantic of a property with a single index parameter.
Enumerations
  EnumerationDescription
Public enumerationAspectInitializationReason
Enumerates the reasons why the target method of the InitializeAspectInstanceAdvice has been invoked.
Public enumerationCustomAttributeOverrideAction
Behavior of CopyCustomAttributesAttribute when a custom attribute of the same type already exists on the target declaration.
Public enumerationImportMemberOrder
Enumeration of moments when members should be imported into an aspect.
Public enumerationInterfaceOverrideAction
Enumeration of actions to be overtaken when an interface that should be introduced into a type is already implemented by that type.
Public enumerationMemberOverrideAction
Enumeration of actions to be overtaken by the IntroduceMemberAttribute aspect extension when the member to be introduced already exists in the aspect target type or its base type.