Open sandboxFocus
  • TOC

Metalama Documentation

Getting started

Video tutorials

Conceptual documentation

Commented examples

API documentation

Aspect API

Extensions API

Patterns API

Flashtrace API

Introspection API

Advanced API

Post­Sharp API migration

Post­Sharp

Post­Sharp.​Aspects

Advice­Args

Arguments

Aspect3

Aspect­Description­Attribute2

Aspect­Info

Aspect­Instance2

Aspect­Specification

Aspect­Utilities

Assembly­Level­Aspect4

Async­Call­Id

Composition­Aspect5

Custom­Attribute­Introduction­Aspect

Event­Interception­Args2

Event­Interception­Aspect5

Event­Level­Aspect4

Field­Level­Aspect4

Flow­Behavior

IAspect

IAspect­Build­Semantics

IAspect­Instance

IAspect­Provider

IAspect­Repository­Service

IAssembly­Level­Aspect

IAssembly­Level­Aspect­Build­Semantics

IAsync­Method­Binding

IAsync­Method­Interception­Aspect

IClone­Aware­Aspect

IComposition­Aspect

ICustom­Attribute­Introduction­Aspect

IEvent­Binding

IEvent­Interception­Aspect

IEvent­Level­Aspect

IEvent­Level­Aspect­Build­Semantics

IField­Level­Aspect

IField­Level­Aspect­Build­Semantics

IInstance­Scoped­Aspect

ILicensed­Aspect

ILocation­Binding

ILocation­Binding<T>

ILocation­Binding­Action<TPayload>

ILocation­Interception­Args

ILocation­Interception­Args<T>

ILocation­Interception­Args­Action<TPayload>

ILocation­Interception­Aspect

ILocation­Level­Aspect

ILocation­Level­Aspect­Build­Semantics

ILocation­Validation­Aspect

ILocation­Validation­Aspect<T>

IManaged­Resource­Introduction­Aspect

IMethod­Binding

IMethod­Interception­Aspect

IMethod­Level­Aspect

IMethod­Level­Aspect­Build­Semantics

Instance­Level­Aspect5

IOn­Exception­Aspect

IOn­Instance­Location­Initialized­Aspect

IOn­Method­Boundary­Aspect

IOn­State­Machine­Boundary­Aspect

IType­Level­Aspect

IType­Level­Aspect­Build­Semantics

Lines­Of­Code­Avoided­Attribute2

Location­Binding­Extensions

Location­Initialization­Args3

Location­Interception­Args3

Location­Interception­Aspect5

Location­Level­Aspect4

Location­Validation­Context

Managed­Resource­Introduction­Aspect

Method­Binding­Invoke­Awaitable

Method­Binding­Invoke­Awaiter

Method­Execution­Args2

Method­Implementation­Aspect5

Method­Interception­Args2

Method­Interception­Aspect5

Method­Interception­Proceed­Awaitable

Method­Interception­Proceed­Awaiter

Method­Level­Aspect4

Module­Initializer­Attribute2

Null­Task­Sentinel

On­Exception­Aspect5

On­Method­Boundary­Aspect5

Semantically­Advised­Method­Kinds

Type­Identity

Type­Level­Aspect4

Unsupported­Target­Action

Post­Sharp.​Aspects.​Advices

Post­Sharp.​Aspects.​Configuration

Post­Sharp.​Aspects.​Dependencies

Post­Sharp.​Aspects.​Internals

Post­Sharp.​Aspects.​Serialization

Post­Sharp.​Collections

Post­Sharp.​Constraints

Post­Sharp.​Extensibility

Post­Sharp.​Extensibility.​Build­Time­Logging

Post­Sharp.​Reflection

Post­Sharp.​Reflection.​Method­Body

Post­Sharp.​Serialization

  • Article

Class EventInterceptionArgs

In PostSharp, this object exposed the run-time execution context to an event interception 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.

Inheritance
EventInterceptionArgs
Namespace: PostSharp.Aspects
Assembly: Metalama.Migration.dll
Syntax
[Obsolete("In PostSharp, this object exposed the run-time execution context to an event interception 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 abstract class EventInterceptionArgs : AdviceArgs

Constructors

Name Description
EventInterceptionArgs()

Properties

Name Description
Arguments

In PostSharp, gets arguments in an OnInvokeHandler(EventInterceptionArgs) advice. In Metalama, this advice type is not supported.

Binding

Use IEvent.Add(dynamic?), IEvent.Remove(dynamic?) or IEvent.Raise(params dynamic?[]) to generate run-time code that accesses the event.

Event

Use meta.Target.Event. If you need a run-time EventInfo. call ToEventInfo().

Handler

Use the value parameter in the template.

ReturnValue

In PostSharp, gets the return value after ProceedInvokeHandler() has been called. In Metalama, ProceedInvokeHandler() is not supported, however you can call the handler yourself (it is exposed as the value template parameter) and store the result in a local variable.

Methods

Name Description
AddHandler(Delegate)

Use meta.Proceed() from the advice that overrides the event adder, or use IEvent.Add(dynamic?).

InvokeHandler(Delegate, Arguments)

Not supported in Metalama.

ProceedAddHandler()

Use meta.Proceed() from the advice that overrides the event adder, or use IEvent.Add(dynamic?).

ProceedInvokeHandler()

Not supported in Metalama.

ProceedRemoveHandler()

Use meta.Proceed() from the advice that overrides the event remover, or use IEvent.Remove(dynamic?).

RemoveHandler(Delegate)

Use meta.Proceed() from the advice that overrides the event remover, or use IEvent.Remove(dynamic?).

Extension Methods