예제 #1
0
        /// <summary>
        /// Adds a new TypedOperation to the collection
        /// </summary>
        /// <param name="op"></param>
        public void Add(TypedOperation op)
        {
            if (null == op)
            {
                throw new ArgumentNullException("op");
            }

            if (this.Contains(op) == false)
            {
                _ops.Add(op.GetHashCode(), op);
            }
        }
예제 #2
0
        /// <summary>
        ///  Returns true if this collection contains a TypedOperation that matches the parameter
        /// </summary>
        /// <param name="op"></param>
        /// <returns></returns>
        public bool Contains(TypedOperation op)
        {
            TypedOperation value;
            int            hash = op.GetHashCode();

            if (_ops.TryGetValue(hash, out value))
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
예제 #3
0
        /// <summary>
        /// Returns true if this collection contains a TypedOperation that matches the parameters
        /// </summary>
        /// <param name="type"></param>
        /// <param name="operation"></param>
        /// <returns></returns>
        public bool Contains(DBSchemaTypes type, DBSchemaOperation operation)
        {
            TypedOperation value;
            int            hash = TypedOperation.GetHashCode(type, operation);

            if (_ops.TryGetValue(hash, out value))
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
예제 #4
0
        /// <summary>
        /// Removes any TypedOperation from this collection that has a matching type and operation to the provided op.
        /// </summary>
        /// <param name="op"></param>
        public void Remove(TypedOperation op)
        {
            int hash = op.GetHashCode();

            this._ops.Remove(hash);
        }
예제 #5
0
        /// <summary>
        /// Removes a TypedOperation from this collection that has a type and operation matching the parameters
        /// </summary>
        /// <param name="type"></param>
        /// <param name="operation"></param>
        public void Remove(DBSchemaTypes type, DBSchemaOperation operation)
        {
            TypedOperation value = new TypedOperation(type, operation);

            this.Remove(value);
        }
예제 #6
0
        /// <summary>
        /// Adds a new TypedOperation to the collection based on the type and operation
        /// </summary>
        /// <param name="type"></param>
        /// <param name="operation"></param>
        public void Add(DBSchemaTypes type, DBSchemaOperation operation)
        {
            TypedOperation value = new TypedOperation(type, operation);

            this.Add(value);
        }