PostSharpAPI ReferencePost­Sharp.​Aspects.​AdvicesIntroduce­Method­Advice­InstanceIntroduce­Method­Advice­Instance
Open sandboxFocus

IntroduceMethodAdviceInstance Constructor

IntroduceMethodAdviceInstance(MethodInfo, Visibility, Nullable<Boolean>, MemberOverrideAction)

Initializes a new instance of the IntroduceMethodAdviceInstance class.

public IntroduceMethodAdviceInstance(MethodInfo method, Visibility visibility, Nullable<bool> isVirtual, MemberOverrideAction overrideAction)
Type Name Description
MethodInfo method

A public method of the aspect class.

Visibility visibility

Visibility of the introduced method.

Nullable<Boolean> isVirtual

true if the introduced method should be virtual, false if it should be non-virtual (or sealed, if the method is overriding another one), or null if the method should be virtual only if the overridden method is also virtual. See IsVirtual for details.

MemberOverrideAction overrideAction

Determines the action to be overtaken when the member to be introduced already exists in the type to which the aspect is applied, or to a base type.