예제 #1
0
 /// <summary>
 /// Receives a new computation from the computation rule
 /// </summary>
 /// <param name="computation">The computation that is received</param>
 public void HandleDependency(Computation computation)
 {
     if (computation != null && computation.TransformationContext == Context)
     {
         var c = new TransformationComputationWrapper <TIn, TOut>(computation);
         if (Filter != null && !Filter(c))
         {
             return;
         }
         if (CollectionChanged != null)
         {
             CollectionChanged(this, new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Add, c));
         }
         items.Add(c);
     }
 }
예제 #2
0
 /// <summary>
 /// Gets a value indicating whether the current transformation computation wrapper and the provided instance should be treated as equal
 /// </summary>
 /// <param name="other">The other instance</param>
 /// <returns>True, if the current object represents the same value as the given parameter, otherwise false</returns>
 public bool Equals(TransformationComputationWrapper <TIn, TOut> other)
 {
     return(other.c == c);
 }