PostSharpAPI ReferencePost­Sharp.​Patterns.​RecordingRecordable­AttributeIAspect­Provider.​Provide­Aspects
Open sandboxFocus

RecordableAttribute.IAspectProvider.ProvideAspects Method

IAspectProvider.ProvideAspects(Object)

Provides new aspects.

Declaration
IEnumerable<AspectInstance> IAspectProvider.ProvideAspects(object targetElement)
Parameters
Type Name Description
Object targetElement

Code element (Assembly, System.Type, System.Reflection.FieldInfo, System.Reflection.MethodBase, System.Reflection.PropertyInfo, EventInfo, ParameterInfo, or LocationInfo) to which the current aspect has been applied.

Returns
Type Description
System.Collections.Generic.IEnumerable<AspectInstance>

A set of aspect instances.

Implements
IAspectProvider.ProvideAspects(Object)
Remarks

Implementations of this method are only allowed to return aspect instances applied on elements of code located under the target element of code (targetElement). For instance, a type-level IAspectProvider can provide aspects on methods of the current type, but not of other types.