示例#1
0
        /// <summary>
        /// Adds an operation to the Operations collection
        /// </summary>
        /// <param name="operation">Operation to add</param>
        public void AddOperation(Operation operation)
        {
            if (operation == null)
            {
                throw new ArgumentNullException("operation");
            }

            CheckObjectIsValid(operation);
            if (Operations.ContainsKey(operation.Key))
            {
                return;
            }

            Instance.AddOperation(operation);
            Operations.AddValue(operation);
        }