Exemplo n.º 1
0
 public bool Contains(OperationSet valueSet)
 {
     foreach (var value in valueSet.Operations)
     {
         if (Operations.Contains(value))
         {
             return(true);
         }
     }
     return(false);
 }
Exemplo n.º 2
0
        public static OperationSet operator |(Operation op1, Operation op2)
        {
            OperationSet value1 = new OperationSet(op1);
            OperationSet value2 = new OperationSet(op2);

            if (value2?.Operations != null)
            {
                value1.Operations.AddRange(value2.Operations);
                var all = value1.Operations.Distinct().ToList();
                value1.Operations = all;
            }
            return(value1);
        }