Пример #1
0
 public static IUnaryNumberOperation Apply(this IBinaryNumberOperation outer, IUnaryNumberOperation left, IUnaryNumberOperation right)
 {
     if (outer == null)
     {
         throw new ArgumentNullException(nameof(outer));
     }
     return(new BinaryUnaryUnaryOperation(outer, left, right));
 }
Пример #2
0
 public static IBinaryNumberOperation Swap(this IBinaryNumberOperation operation)
 {
     if (operation == null)
     {
         throw new ArgumentNullException(nameof(operation));
     }
     return(new SwapOperation(operation));
 }
Пример #3
0
 public static IUnaryNumberOperation AsUnary(this IBinaryNumberOperation operation)
 {
     if (operation == null)
     {
         throw new ArgumentNullException(nameof(operation));
     }
     return(new BinaryAsUnaryOperation(operation));
 }
Пример #4
0
 public static BinaryAbstractNumber AsNumber(this IBinaryNumberOperation operation)
 {
     if (operation == null)
     {
         throw new ArgumentNullException(nameof(operation));
     }
     return(new BinaryAbstractNumber(operation));
 }
Пример #5
0
 public static IBinaryNumberOperation Apply(this IUnaryNumberOperation outer, IBinaryNumberOperation inner)
 {
     if (outer == null)
     {
         throw new ArgumentNullException(nameof(outer));
     }
     if (inner == null)
     {
         throw new ArgumentNullException(nameof(inner));
     }
     return(new UnaryBinaryOperation(outer, inner));
 }
Пример #6
0
 public static INumberOperation Apply(this IBinaryNumberOperation outer, INumberOperation left, INumberOperation right)
 {
     if (outer == null)
     {
         throw new ArgumentNullException(nameof(outer));
     }
     if (left == null)
     {
         throw new ArgumentNullException(nameof(left));
     }
     if (right == null)
     {
         throw new ArgumentNullException(nameof(right));
     }
     return(new BinaryNullaryStandardNumber(outer, left, right));
 }