/// <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); } }
/// <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); } }
/// <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); } }
/// <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); }
/// <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); }
/// <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); }