Esempio n. 1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="condition"></param>
 internal void AddParent(IParentCondition condition)
 {
     Debug.Assert(!Succeeded, "This method should not be called if event has succeeded");
     if (!CanHaveParents)
     {
         return;
     }
     if (Conditions == null)
     {
         Conditions = condition;
     }
     else if (Conditions.Count == 1)
     {
         if (!Conditions.First.Equals(condition))
         {
             var conds = new SinglyLinkedList <IParentCondition>();
             conds.AddLast(Conditions as IParentCondition);
             conds.AddLast(condition);
             Conditions = conds;
         }
     }
     else if (!Conditions.Contains(condition))
     {
         Conditions.AddLast(condition);
     }
 }
Esempio n. 2
0
 bool ICollection <IParentCondition> .Remove(IParentCondition item)
 {
     throw new DessertException(ErrorMessages.InvalidMethod);
 }
Esempio n. 3
0
 void ILinkedList <IParentCondition> .AddLast(IParentCondition item)
 {
     throw new DessertException(ErrorMessages.InvalidMethod);
 }
Esempio n. 4
0
 bool ICollection <IParentCondition> .Contains(IParentCondition item)
 {
     return(Equals(item));
 }