コード例 #1
0
 public static Func <Flexpression, Flexpression, Flexpression> GetOperatorDefinitionOrNull(
     this IReadOnlyDictionary <DefinableFxBinaryOperator, Func <Flexpression, Flexpression, Flexpression> > source,
     DefinableFxBinaryOperator @operator)
 {
     return(source.TryGetValue(@operator, out var value) ? value : null);
 }
コード例 #2
0
        public static string GetSymbol(this DefinableFxBinaryOperator source)
        {
            var op = (OverloadableCodeBinarySymmetricOperator)source;

            return(op.GetSymbol());
        }
コード例 #3
0
 public BinaryOperatorDefinition(DefinableFxBinaryOperator @operator, Func <Flexpression, Flexpression, Flexpression> expression)
 {
     Operator   = @operator;
     Expression = expression;
 }
コード例 #4
0
        public static OverloadableCodeBinarySymmetricOperator ToCodeOperator(this DefinableFxBinaryOperator source)
        {
            var res = (OverloadableCodeBinarySymmetricOperator)source;

            return(res);
        }
コード例 #5
0
 public static BinaryOperatorDefinition Create(
     DefinableFxBinaryOperator @operator,
     Func <Flexpression, Flexpression, Flexpression> expression)
 {
     return(new BinaryOperatorDefinition(@operator, expression));
 }