示例#1
0
 public static UnaryAbstractNumber AsNumber(this IUnaryNumberOperation operation)
 {
     if (operation == null)
     {
         throw new ArgumentNullException(nameof(operation));
     }
     return(new UnaryAbstractNumber(operation));
 }
示例#2
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));
 }
示例#3
0
 public static IBinaryNumberOperation AsBinary(this IUnaryNumberOperation operation)
 {
     if (operation == null)
     {
         throw new ArgumentNullException(nameof(operation));
     }
     return(new UnaryAsBinaryOperation(operation));
 }
示例#4
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));
 }