PostSharp 5.0 / / Post­Sharp Documentation / API Reference / Post­Sharp.​Patterns.​Model Namespace / Notify­Property­Changing­Adapter Class / Notify­Property­Changing­Adapter Methods / Notify­Property­Changing­Adapter.​Add­Handler Method

NotifyPropertyChangingAdapter.AddHandler Method

Adds a handler to PropertyChanging event.

Namespace:  PostSharp.Patterns.Model
Assembly:  PostSharp.Patterns.Model (in PostSharp.Patterns.Model.dll) Version: 5.0.55.0 (5.0.55.0)
Syntax
C#
public abstract Delegate AddHandler(
	Object instance,
	Action<string> handler
)

Parameters

instance
Type: System.Object
Instance.
handler
Type: System.Action<String>
Handler delegate that receives property name as an argument.

Return Value

Type: Delegate
Delegate that was registered to the event or

Field Value

Type: Delegate
null if instance does not implement the represented interface.
Remarks

An implementation should never return null, instead it should return the result of this.Next.AddHandler.

See Also