MetalamaAPI documentationPost­Sharp API migrationPost­Sharp.​AspectsIOn­Method­Boundary­Aspect
Open sandboxFocus

IOnMethodBoundaryAspect Interface

Use OverrideMethodAspect and implement your own try/catch/finally block.

Namespace: PostSharp.Aspects
Assembly: Metalama.Migration.dll
Syntax
public interface IOnMethodBoundaryAspect : IMethodLevelAspect, IAspect

Methods

Name Description
OnEntry(MethodExecutionArgs)

Implement OverrideMethod() and add this logic before the call to meta.Proceed().

OnException(MethodExecutionArgs)

Implement OverrideMethod(), call meta.Proceed() in a try/catch block, and add this logic to the catch block.

OnExit(MethodExecutionArgs)

Implement OverrideMethod(), call meta.Proceed() in a try/finally block, and add this logic to the finally block.

OnSuccess(MethodExecutionArgs)

Implement OverrideMethod(), call meta.Proceed() in a try/catch block, and add this logic to the end of the try block.