/// <summary> /// Determines if the collection contains another Provider with the same name /// </summary> /// <param name="provider">The Provider to look for</param> /// <returns></returns> protected bool Contains(Provider provider) { if (provider == null) throw new ArgumentNullException("provider"); return (this[provider.Name] != null); }
/// <summary> /// Adds the Provider to the collection /// </summary> /// <param name="provider">The provider to add</param> internal void Add(Provider provider) { if (this.Contains(provider)) throw new ProviderAlreadyExistsException(provider.Name); lock (base.SyncRoot) { base.InnerList.Add(provider); } }
/// <summary> /// Removes the Provider from the collection /// </summary> /// <param name="provider"></param> protected void Remove(Provider provider) { if (this.Contains(provider)) lock (base.SyncRoot) { base.InnerList.Remove(provider); } }