In Metalama, use OverrideMethodAspect.
Implements
Namespace: PostSharp.Aspects
Assembly: Metalama.Migration.dll
Syntax
[AttributeUsage(AttributeTargets.Assembly|AttributeTargets.Class|AttributeTargets.Struct|AttributeTargets.Constructor|AttributeTargets.Method|AttributeTargets.Property|AttributeTargets.Event|AttributeTargets.Interface, AllowMultiple = true, Inherited = false)]
[MulticastAttributeUsage(MulticastTargets.Method|MulticastTargets.InstanceConstructor|MulticastTargets.StaticConstructor, AllowMultiple = true, TargetMemberAttributes = MulticastAttributes.NonAbstract)]
[Obsolete("In Metalama, use 'OverrideMethodAspect'.", false)]
public abstract class OnMethodBoundaryAspect : MethodLevelAspect, IMethodLevelAspectBuildSemantics, IAspectBuildSemantics, IValidableAnnotation, IOnStateMachineBoundaryAspect, IOnMethodBoundaryAspect, IMethodLevelAspect, IAspect
Constructors
Name | Description |
---|---|
OnMethodBoundaryAspect() |
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. |
OnEntry(MethodExecutionArgs) | Implement OverrideMethod() and add this logic before the call to meta.Proceed(). |
OnException(MethodExecutionArgs) | Implement OverrideMethod(), call meta.Proceed() in a |
OnExit(MethodExecutionArgs) | Implement OverrideMethod(), call meta.Proceed() in a |
OnResume(MethodExecutionArgs) | This feature is not implemented in Metalama and there is no workaround. |
OnSuccess(MethodExecutionArgs) | Implement OverrideMethod(), call meta.Proceed() in a |
OnYield(MethodExecutionArgs) | This feature is not implemented in Metalama and there is no workaround. |
SetAspectConfiguration(AspectConfiguration, MethodBase) | Not supported in Metalama. |