private static void AddHandler(IInvocation invocation, INotifyInvocation propertyChangedInterceptor)
        {
            if (!Handlers.ContainsKey(invocation.InvocationTarget))
            {
                Handlers.Add(invocation.InvocationTarget, new Dictionary <string, PropertyChangedEventHandler>());
            }

            Handlers[invocation.InvocationTarget].Add(invocation.PropertyName(),
                                                      (o, e) => { propertyChangedInterceptor.Notify(invocation); });

            ((INotifyPropertyChanged)invocation.GetArgumentValue(0)).PropertyChanged +=
                Handlers[invocation.InvocationTarget][invocation.PropertyName()];
        }
 protected PropertyChangedInterception(INotifyInvocation notifiedObject, IInvocation invocation)
 {
     NotifiedObject = notifiedObject;
     Invocation     = invocation;
 }
 public PropertyChangedRemoveInterception(INotifyInvocation notifiedObject, IInvocation invocation)
     : base(notifiedObject, invocation)
 {
 }
 public PropertyIsINotifyInterception(INotifyInvocation notifiedObject, IInvocation invocation) : base(
         notifiedObject, invocation)
 {
 }
Beispiel #5
0
 public OnlyOnChangePropertySetterInterception(INotifyInvocation notifiedObject, IInvocation invocation)
     : base(notifiedObject, invocation)
 {
 }