PostSharp SDK 6.7 / / Class Reference / Post­Sharp.​Sdk.​Aspect­Weaver Namespace / Aspect­Weaver Class

AspectWeaver Class

An object that knows how to process a specific aspect. Aspect weavers must be associated to aspect interfaces (derived from IAspect using BindAspectWeaver<TAspect, TImpl>(). An AspectWeaver is associated with an aspect type and is independent from aspect usage, which is encapsulated by AspectWeaverInstance.
Inheritance Hierarchy
System.Object
  PostSharp.Sdk.AspectWeaver.AspectWeaver
    More...

Namespace:  PostSharp.Sdk.AspectWeaver
Assembly:  PostSharp.Compiler.Engine (in PostSharp.Compiler.Engine.dll) Version: 6.7.10.0 (6.7.10.0)
Syntax
C#
public abstract class AspectWeaver

The AspectWeaver type exposes the following members.

Constructors
  NameDescription
Protected methodAspectWeaver
Initializes a new AspectWeaver.
Properties
  NameDescription
Public propertyAdviceWeavers
Gets the collection of weavers of advices included in the current aspect type.
Public propertyAspectConfigurationAttributeSystemType
Gets the Type of the aspect configuration custom attribute.
Public propertyAspectDescription
Public propertyAspectInfrastructureTask
Gets the parent AspectInfrastructureTask.
Public propertyAspectRuntimeType
Public propertyAspectType
Gets the aspect type processed by the current AspectWeaver.
Public propertyAspectWeaverTask
Gets the parent AspectWeaverTask.
Public propertyCanTargetAspects
Public propertyDeclarativeConfiguration
Gets the aspect configuration that was provided declaratively, using a custom attribute of type AspectConfigurationAttribute.
Public propertyDependencies
Gets the collection of dependencies (AspectDependency) of the current aspect type (where dependency objects of the current aspect weaver occupy the left position of the relationship), for dependency objects that apply on the element of code to which this aspect is applied.
Public propertyIsInstanceScoped
Determines whether the current aspect type is instance-scoped.
Public propertyLinesOfCodeAvoidedExplicit
Count of lines of code avoided set explicitly using LinesOfCodeAvoidedAttribute.
Public propertyLinesOfCodeAvoidedImplicitBase
Count of lines of code avoided by each usage of the aspect.
Public propertyModule
Gets the ModuleDeclaration being processed.
Public propertyReflectionObjectBuilder
Gets the ReflectionObjectBuilder able to emit instructions that load the reflection object corresponding to the element of code to which the aspects of this AspectWeaver are applied.
Public propertyRequiresRuntimeInstance
Determines whether the current aspect requires a runtime instance.
Public propertyRequiresRuntimeInstanceInitialization
Determines whether the current aspect requires initialization of the runtime instance.
Public propertyRequiresRuntimeReflectionObject
Determines whether the current AspectWeaver shall need a reference to the reflection object representing the element of code to which aspects are applied.
Public propertyTypeLevelDependencies
Gets the collection of dependencies (AspectDependency) of the current aspect type (where dependency objects of the current aspect weaver occupy the left position of the relationship), for dependency objects that apply on type declaring the element of code to which this aspect is applied. If the aspect is not applied to a type member (or a parameter of a type member), this property is equal to Dependencies.
Public propertyValidTargets
Gets the kinds of elements of code to which aspects of the current AspectWeaver can be applied.
Public propertyWaivedEffects
Gets the set of effects that are waived (opted out) for the current AspectWeaver.
Methods
  NameDescription
Public methodAddLicenseRequirement Obsolete.
Adds a license requirement for the current AspectWeaver.
Protected methodApplyWaivedEffects
Remove the effects waived from the current aspect type (as added to the WaivedEffects collection) from transformation.
Protected methodCreateAspectWeaverInstance
Creates a new AspectWeaverInstance for a given aspect instance.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetAspectDisplayName
Gets a human-readable name of the current aspect type.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetImplicitLinesOfCodeAvoidedByAdvice
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodHasLinesOfCodeAvoided
Protected methodInitialize
Initialize the current weaver and its aspect.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Overrides Object.ToString().)
Public methodValidateAspectInstance
Validates an aspect instance, i.e. a concrete usage of an aspect of the type supported by the current AspectWeaver.
See Also
Inheritance Hierarchy