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

IntroduceInterfaceAdviceInstance Constructor

IntroduceInterfaceAdviceInstance(Type, InterfaceOverrideAction, InterfaceOverrideAction)

Initializes a new instance of the IntroduceInterfaceAdviceInstance class.

Declaration
public IntroduceInterfaceAdviceInstance(Type interfaceType, InterfaceOverrideAction overrideAction, InterfaceOverrideAction ancestorOverrideAction)
Parameters
Type Name Description
System.Type interfaceType

Interface to introduce to the target class. Must be implemented by the aspect class itself.

InterfaceOverrideAction overrideAction

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.

InterfaceOverrideAction ancestorOverrideAction

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.