예제 #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);
     });
 }
예제 #2
0
 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;
     }));
 }
예제 #4
0
 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;
     }));
 }