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); }
public static void Unregister(MathOperation operation) => registeredOperations.Remove(operation);