示例#1
0
        internal static gsMathOperationType ToMathOperationType(this BinaryExpressionType binaryExpressionType)
        {
            switch (binaryExpressionType)
            {
            case BinaryExpressionType.Add:
                return(gsMathOperationType.Add);

            case BinaryExpressionType.Subtract:
                return(gsMathOperationType.Subtract);

            case BinaryExpressionType.Multiply:
                return(gsMathOperationType.Multiply);

            case BinaryExpressionType.Divide:
                return(gsMathOperationType.Divide);

            case BinaryExpressionType.Modulo:
                return(gsMathOperationType.Modulo);

            default:
                throw new NotImplementedException($"Binary expression type {binaryExpressionType.GetType().Name} not supported");
            }
        }