PostSharp 6.6 / / Post­Sharp Documentation / API Reference / Post­Sharp.​Aspects.​Advices Namespace / Import­Method­Advice­Instance Class

ImportMethodAdviceInstance Class

Represents an advises that import a method of the target class into the aspect class.
Inheritance Hierarchy

Namespace:  PostSharp.Aspects.Advices
Assembly:  PostSharp (in PostSharp.dll) Version: (
public sealed class ImportMethodAdviceInstance : ImportMemberAdviceInstance

The ImportMethodAdviceInstance type exposes the following members.

Public methodImportMethodAdviceInstance(FieldInfo, String, Boolean, ImportMemberOrder)
Initializes a new instance of the ImportMethodAdviceInstance.
Public methodImportMethodAdviceInstance(FieldInfo, String[], Boolean, ImportMemberOrder)
Initializes a new instance of the ImportMethodAdviceInstance.
Public propertyAspectField
Gets the field of the aspect class to which the field or property needs to be bound.
(Inherited from ImportMemberAdviceInstance.)
Public propertyDescription
A human-readable description of the current advice instance.
(Inherited from AdviceInstance.)
Public propertyIsRequired
Determines whether a build-time error should be emitted if the member cannot be found. If false, the binding field will be null in case the imported member is absent.
(Inherited from ImportMemberAdviceInstance.)
Public propertyLinesOfCodeAvoided
The number of lines of hand-written code avoided by this specific AdviceInstance.
(Inherited from AdviceInstance.)
Public propertyMasterAspectMember
Gets the main field or method of the aspect class that the current AdviceInstance relates to.
(Inherited from ImportMemberAdviceInstance.)
Public propertyMember
Gets the reflection object (LocationInfo or MethodInfo) that needs to be imported, or null if the exact member is unknown and must be matched by name and signature.
(Overrides ImportMemberAdviceInstance.Member.)
Public propertyMemberNames
Gets the fallback list of possible names of the member to be imported.
(Overrides ImportMemberAdviceInstance.MemberNames.)
Public propertyOrder
Determines whether the AspectField should be bound to the member as resolved before or after introduction of new members into the target class by the current advise.
(Inherited from ImportMemberAdviceInstance.)
See Also