PostSharpAPI ReferencePost­Sharp.​Aspects.​AdvicesImport­Location­Advice­Instance
Open sandboxFocus

ImportLocationAdviceInstance Class

Represents an advice that imports a field or property (represented by a LocationInfo) of the target class into a field of the aspect class. This class is the imperative equivalent of the ImportMemberAttribute declarative advise.

Inheritance
System.Object
ImportLocationAdviceInstance
Namespace: PostSharp.Aspects.Advices
Assembly: PostSharp.dll
Syntax
public sealed class ImportLocationAdviceInstance : ImportMemberAdviceInstance

Constructors

Name Description
ImportLocationAdviceInstance(FieldInfo, LocationInfo)

Initializes a new instance of the ImportLocationAdviceInstance class and specifies which field or property should be imported by giving its reflection representation.

ImportLocationAdviceInstance(FieldInfo, String, Boolean, ImportMemberOrder)

Initializes a new instance of the ImportLocationAdviceInstance class and specifies the name of the property to be imported; the type of this property will be matched according to the type of the aspect field.

ImportLocationAdviceInstance(FieldInfo, String[], Boolean, ImportMemberOrder)

Initializes a new instance of the ImportLocationAdviceInstance class and specifies the name of the property to be imported; the type of this property will be matched according to the type of the aspect field.

Properties

Name Description
Location

Gets the field or property of the target class that needs to be imported into the aspect.

Member

Gets the reflection object (LocationInfo or System.Reflection.MethodInfo) that needs to be imported, or null if the exact member is unknown and must be matched by name and signature.

MemberNames

Gets the fallback list of possible names of the member to be imported.

See Also