PostSharp6.0/API Reference/Post­Sharp.​Aspects.​Advices Namespace/Introduce­Interface­Advice­Instance Class/Introduce­Interface­Advice­Instance Constructor

IntroduceInterfaceAdviceInstance Constructor

Initializes a new instance of the IntroduceInterfaceAdviceInstance class.

Namespace:  PostSharp.Aspects.Advices
Assembly:  PostSharp (in PostSharp.dll) Version: 6.1.6.0 (6.1.6.0)
Syntax
C#
public IntroduceInterfaceAdviceInstance(
	Type interfaceType,
	InterfaceOverrideAction overrideAction = InterfaceOverrideAction.Default,
	InterfaceOverrideAction ancestorOverrideAction = InterfaceOverrideAction.Default
)

Parameters

interfaceType
Type: System.Type
Interface to introduce to the target class. Must be implemented by the aspect class itself.
overrideAction (Optional)
Type: PostSharp.Aspects.Advices.InterfaceOverrideAction
Specifies the action (Fail or Ignore) to be overtaken when the interface specified in the constructor of this custom attribute is already implemented by the type to which the current aspect is applied.
ancestorOverrideAction (Optional)
Type: PostSharp.Aspects.Advices.InterfaceOverrideAction
Specifies the action (Fail or Ignore) to be overtaken when an ancestor of the interface specified in the constructor of this custom attribute is already implemented by the type to which the current aspect is applied.
See Also