Open sandboxFocus

Interface ILocationBinding

In PostSharp, a binding was a run-time object that allowed the run-time code of the aspect to call the target code. In Metalama, aspects no longer have run-time code. Instead, they have templates that are expanded at compile time and generate run-time code. Templates can generate run-time code that accesses target code using dynamic code or invokers. For fields and properties, use meta.Target.FieldOrProperty.Value.

Namespace: PostSharp.Aspects
Assembly: Metalama.Migration.dll
Syntax
[InternalImplement]
[Obsolete("In PostSharp, a binding was a run-time object that allowed the run-time code of the aspect to call the target code. In Metalama, aspects no longer have run-time code. Instead, they have templates that are expanded at compile time and generate run-time code. Templates can generate run-time code that accesses target code using dynamic code or invokers. For fields and properties, use 'meta'.'meta.Target'.'IMetaTarget.FieldOrProperty'.'IExpression.Value'.", false)]
public interface ILocationBinding

Properties

Name Description
DeclarationIdentifier

There is no equivalent in Metalama.

LocationInfo

In Metalama, use meta.Target.FieldOrProperty. If you need a run-time object, use IFieldOrProperty.ToFieldOrPropertyInfo().

LocationType

In Metalama, use meta.Target.FieldOrProperty.Type>. If you need a run-time object, use IType.ToType().

Methods

Name Description
Execute<TPayload>(ILocationBindingAction<TPayload>, ref TPayload)

There is no equivalent in Metalama.

GetValue(ref object, Arguments)

In Metalama, get meta.Target.FieldOrProperty.Value.

SetValue(ref object, Arguments, object)

In Metalama, set meta.Target.FieldOrProperty.Value.

Extension Methods