ImportMethodAdviceInstance Constructor (FieldInfo, String, Boolean, ImportMemberOrder)
Assembly: PostSharp (in PostSharp.dll) Version: 2023.0.3.0 (2023.0.3.0)
public ImportMethodAdviceInstance( FieldInfo aspectField, string methodName, bool isRequired = false, ImportMemberOrder order = ImportMemberOrder.Default )
- Type: System.Reflection.FieldInfo
A field of the aspect class into that will be assigned to a delegate of the imported method at runtime. The field type should be a delegate of the same signature than the method to import.
- Type: System.String
Name of the method to import.
- isRequired (Optional)
- Type: System.Boolean
true if the build should fail if there no matching method in the target class, false to set aspectField to null in this case.
- order (Optional)
- Type: PostSharp.Aspects.Advices.ImportMemberOrder
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.