public void AddBinaryOperation(IBinaryOperation operation) { if (!BinaryOperations.Contains(operation)) { BinaryOperations.Add(operation); } }
private static void RegiterOperations() { BinaryOperations.Add(OperatorTypes.Add, Add); BinaryOperations.Add(OperatorTypes.Subtract, Subtract); BinaryOperations.Add(OperatorTypes.Divide, Divide); BinaryOperations.Add(OperatorTypes.Multiply, Multiply); BinaryOperations.Add(OperatorTypes.Power, Pow); UnaryOperations.Add(OperatorTypes.Sign, Sign); }