In PostSharp, this object exposed the run-time execution context to the advice. However, in Metalama, advice do not execute at run time. Instead, advice are templates that generate run-time code. This run-time code does not need helper objects to represent the execution context.
Namespace: PostSharp.Aspects
Assembly: Metalama.Migration.dll
Syntax
[Obsolete("In PostSharp, this object exposed the run-time execution context to the advice. However, in Metalama, advice do not execute at run time. Instead, advice are templates that generate run-time code. This run-time code does not need helper objects to represent the execution context.", false)]
public class MethodExecutionArgs : AdviceArgsProperties
| Name | Description |
|---|---|
| Arguments | In Metalama, use meta.Target.Parameters |
| Exception | In Metalama, when you have your own |
| FlowBehavior | There is no equivalent in Metalama because you can code any control flow in the template. |
| Method | In Metalama, use meta.Target.Method. If you need a run-time object, call IMethod.ToMethodInfo(). |
| MethodExecutionTag | In Metalama, use a local variable in the template. |
| ReturnValue | In Metalama, when you call meta.Proceed(), store the return value in a local variable. |
| YieldValue | There is no equivalent in Metalama and no workaround. |