Beispiel #1
0
        public static void Register(MathOperation operation)
        {
            if (IsRegistered(operation.OperationType, operation.OperandTypes))
            {
                throw new InvalidOperationException("An operation with the same OperationType and OperandTypes is already registered.");
            }

            registeredOperations.Add(operation);
        }
Beispiel #2
0
 public static void Unregister(MathOperation operation) => registeredOperations.Remove(operation);