An IStuntBehavior that raises and from property setters.
public class NotifyPropertyChangeBehavior : IStuntBehavior, ICloneable
The behavior intercepts the set_ accessors of properties as well as the
add_/remove_ accessors of the notify events (the generated event
accessors are empty for interface stunts, so the behavior owns subscriber
storage and event dispatch end-to-end).
The incoming value is compared against the last value written through the
pipeline using Equals(Object?, Object?); no property getter
is ever invoked, keeping the behavior Native AOT-friendly. Assigning an
unchanged value raises neither event. By default the setter still runs;
pass true for shortCircuitUnchanged to skip the
setter entirely for unchanged values.
is raised before the
setter runs; is raised
after a successful set. A throwing setter (or an exception-return) records no
value and raises no PropertyChanged.
State is held in instance fields, so each stunt needs its own behavior
instance. When using StuntBuilder, register via
AddBehavior<NotifyPropertyChangeBehavior>() (or a factory) so every
built stunt gets a fresh instance; the behavior also implements
ICloneable, so plain instance registrations are cloned per stunt.
kind:method, kind:property, kind:ctor. Press Esc to clear.NotifyPropertyChangeBehavior()Initializes the behavior with shortCircuitUnchanged: false.NotifyPropertyChangeBehavior(Boolean)Initializes the behavior.AppliesTo(IMethodInvocation)Applies to property setters (set_*) and to the add_/remove_ accessors of PropertyChanged and PropertyChanging.Clone()Returns a new, empty NotifyPropertyChangeBehavior carrying over the shortCircuitUnchanged setting, so each stunt gets independent notification state.Execute(IMethodInvocation, ExecuteHandler)Handles event subscriptions and property sets as described in the class remarks.