Open sandboxFocus

Class MethodInterceptionAspect

Inheritance
MethodInterceptionAspect
Namespace: PostSharp.Aspects
Assembly: Metalama.Migration.dll
Syntax
[MulticastAttributeUsage(MulticastTargets.Method|MulticastTargets.InstanceConstructor, AllowMultiple = true, PersistMetaData = false, TargetMemberAttributes = MulticastAttributes.NonAbstract)]
[AttributeUsage(AttributeTargets.Assembly|AttributeTargets.Class|AttributeTargets.Struct|AttributeTargets.Method|AttributeTargets.Property|AttributeTargets.Event|AttributeTargets.Interface, AllowMultiple = true)]
[Obsolete("Use 'OverrideMethodAspect'.", false)]
public abstract class MethodInterceptionAspect : MethodLevelAspect, IMethodLevelAspectBuildSemantics, IAspectBuildSemantics, IValidableAnnotation, IAsyncMethodInterceptionAspect, IMethodInterceptionAspect, IMethodLevelAspect, IAspect

Constructors

Name Description
MethodInterceptionAspect()

Properties

Name Description
SemanticallyAdvisedMethodKinds

In Metalama, implement different methods OverrideMethod(), OverrideAsyncMethod(), OverrideEnumerableMethod() or OverrideEnumeratorMethod(), and set the properties UseAsyncTemplateForAnyAwaitable or UseEnumerableTemplateForAnyEnumerable.

UnsupportedTargetAction

There is no equivalent in Metalama. Unsupported targets will throw an exception.

Methods

Name Description
CreateAspectConfiguration()

Not supported in Metalama.

OnInvoke(MethodInterceptionArgs)

In Metalama, implement OverrideMethod().

OnInvokeAsync(MethodInterceptionArgs)

In Metalama, implement OverrideAsyncMethod().

SetAspectConfiguration(AspectConfiguration, MethodBase)

Not supported in Metalama.

Extension Methods