示例#1
0
 public void TriggerChanged(TValue oldValue, TValue newValue)
 {
     if (this.Changed == null)
     {
         return;
     }
     ChangTransaction.Perform(delegate(ChangTransaction t)
     {
         ValueChangedEventArgs <TValue> e = new ValueChangedEventArgs <TValue>(oldValue, newValue, t);
         this.Changed(this, e);
     });
 }
 public void TriggerChanged(NotifyingCollection <TItem> oldValue, NotifyingCollection <TItem> newValue)
 {
     if (this.Changed == null)
     {
         return;
     }
     ChangTransaction.Perform(delegate(ChangTransaction t)
     {
         ValueChangingEventArgs <NotifyingCollection <TItem> > e =
             new ValueChangingEventArgs <NotifyingCollection <TItem> >(oldValue, newValue, t);
         this.Changed(this, e);
     });
 }
示例#3
0
 public bool TriggerChanging(TValue oldValue, TValue newValue)
 {
     if (this.Changing == null)
     {
         return(true);
     }
     return(ChangTransaction.Perform(delegate(ChangTransaction t)
     {
         ValueChangingEventArgs <TValue> e = new ValueChangingEventArgs <TValue>(oldValue, newValue, t);
         this.Changing(this, e);
         return !e.Cancel;
     }));
 }
 public bool TriggerChanging(NotifyingCollection <TItem> oldValue, NotifyingCollection <TItem> newValue)
 {
     if (this.Changing == null)
     {
         return(true);
     }
     return(ChangTransaction.Perform(delegate(ChangTransaction t)
     {
         ValueChangingEventArgs <NotifyingCollection <TItem> > e =
             new ValueChangingEventArgs <NotifyingCollection <TItem> >(oldValue, newValue, t);
         this.Changing(this, e);
         return !e.Cancel;
     }));
 }