internal static MethodInfo GetOperator(AlgorithmBinaryOperatorType operatorType, Type leftType, Type rightType)
        {
            var operatorTypeString = operatorType.ToString();
            var method             = _methods.FirstOrDefault(m => m.MethodInfo.Name == operatorTypeString && m.ParametersType[0] == leftType && m.ParametersType[1] == rightType);

            if (method == null)
            {
                return(null);
            }
            return(method.MethodInfo);
        }
 /// <summary>
 /// Initialize a new instance of <see cref="AlgorithmBinaryOperatorExpression"/>
 /// </summary>
 /// <param name="leftExpression">The left expression</param>
 /// <param name="conditionalOperator">The binary operator</param>
 /// <param name="rightExpression">The right expression</param>
 public AlgorithmBinaryOperatorExpression(AlgorithmExpression leftExpression, AlgorithmBinaryOperatorType conditionalOperator, AlgorithmExpression rightExpression)
 {
     LeftExpression  = leftExpression;
     Operator        = conditionalOperator;
     RightExpression = rightExpression;
 }
 private void PlayOperator(AlgorithmBinaryOperatorType operatorType, ref AlgorithmEntryPointMethod entryPoint)
 {
     entryPoint.Statements.Add(new AlgorithmAssignStatement(new AlgorithmVariableReferenceExpression("result"), new AlgorithmBinaryOperatorExpression(new AlgorithmVariableReferenceExpression("var1"), operatorType, new AlgorithmVariableReferenceExpression("var2"))));
 }