Open sandboxFocus

Enum MethodUseKind

Kinds of use of a method at a site.

Namespace: Metalama.Extensions.Interceptors
Assembly: Metalama.Extensions.Interceptors.dll
Syntax
[CompileTime]
public enum MethodUseKind
Remarks

Later versions can add values. A new kind is presented to existing registrations.

Fields

Name Description
Call

An invocation, for example x.M(a) or E.M(x, a).

DelegateCreation

A method group converted to a delegate, for example list.Select( Transform ), new Action( M ) or var d = M;. A method group added to an event is an EventSubscription, and a method group removed from an event is an EventUnsubscription.

EventSubscription

A method group added to an event, for example button.Click += OnClick;.

EventUnsubscription

A method group removed from an event, for example button.Click -= OnClick;.

FunctionPointer

A method group converted to a function pointer, for example &Square.

None

The default value, which is not a valid use of a method.