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.
Namespace: PostSharp.Aspects.Advices
Assembly: PostSharp.dll
Syntax
public sealed class ImportLocationAdviceInstance : ImportMemberAdviceInstanceConstructors
| 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, bool, 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[], bool, 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 MethodInfo) that needs to be
imported, or |
| MemberNames | Gets the fallback list of possible names of the member to be imported. |