Open sandboxFocus

Enum IntroductionScope

Determines the scope (static vs instance) of a member introduced by an aspect.

Namespace: Metalama.Framework.Aspects
Assembly: Metalama.Framework.dll
Syntax
[CompileTime]
public enum IntroductionScope
Remarks

This enum is used with the Scope property and the scope parameter of programmatic introduction methods like IntroduceMethod(IAdviser<INamedType>, string, IntroductionScope, OverrideStrategy, Action<IMethodBuilder>?, object?, object?). It controls whether the introduced member is static or instance.

Fields

Name Description
Default

The scope is determined by the template: if the template member is static, the introduced member is static; if the template is non-static, the introduced member is an instance member.

Instance

The introduced member is always an instance member, regardless of the template or target declaration.

Static

The introduced member is always a static member, regardless of the template or target declaration.

Target

The introduced member matches the scope of the target declaration to which the aspect is applied.

See Also