public void Ctors () { WsiProfilesElement el = new WsiProfilesElement (); Assert.AreEqual (WsiProfiles.None, el.Name, "A1"); el = new WsiProfilesElement (WsiProfiles.BasicProfile1_1); Assert.AreEqual (WsiProfiles.BasicProfile1_1, el.Name, "A2"); }
public int IndexOf(WsiProfilesElement element) { if (element == null) { throw new ArgumentNullException("element"); } return(base.BaseIndexOf(element)); }
public int IndexOf(WsiProfilesElement element) { if (element == null) { throw new ArgumentNullException("element"); } return base.BaseIndexOf(element); }
public void Remove(WsiProfilesElement element) { if (element == null) { throw new ArgumentNullException("element"); } base.BaseRemove(this.GetElementKey(element)); }
public void CopyTo(WsiProfilesElement[] array, int index) { if (array == null) { throw new ArgumentNullException("array"); } ((ICollection) this).CopyTo(array, index); }
public void Add(WsiProfilesElement element) { if (element == null) { throw new ArgumentNullException("element"); } this.BaseAdd(element); }
public void GetSet () { WsiProfilesElement el = new WsiProfilesElement (); el.Name = WsiProfiles.BasicProfile1_1; Assert.AreEqual (WsiProfiles.BasicProfile1_1, el.Name, "A1"); }
protected override object GetElementKey(ConfigurationElement element) { if (element == null) { throw new ArgumentNullException("element"); } WsiProfilesElement element2 = (WsiProfilesElement)element; return(element2.Name.ToString()); }
public WsiProfilesElement this [object key] { get { return((WsiProfilesElement)BaseGet(key)); } set { WsiProfilesElement el = (WsiProfilesElement)BaseGet(key); if (el == null) { BaseAdd(value); return; } int index = IndexOf(el); BaseRemoveAt(index); BaseAdd(index, value); } }
public WsiProfilesElement this[object key] { get { if (key == null) { throw new ArgumentNullException("key"); } WsiProfilesElement retval = (WsiProfilesElement)this.BaseGet(key); if (retval == null) { throw new System.Collections.Generic.KeyNotFoundException( string.Format(CultureInfo.InvariantCulture, Res.GetString(Res.ConfigKeyNotFoundInElementCollection), key.ToString())); } return(retval); } set { if (value == null) { throw new ArgumentNullException("value"); } if (key == null) { throw new ArgumentNullException("key"); } // NOTE [ivelin : integration fix] The change bellow have the issue that it wont use the collection comparer // if one is specified. We ( System.Configuration ) usually avoid having set_item[ key ] when the element contains // the key and instead provide an Add( element ) method only. if (this.GetElementKey(value).Equals(key)) { if (BaseGet(key) != null) { BaseRemove(key); } Add(value); } else { throw new ArgumentException(string.Format(CultureInfo.InvariantCulture, Res.GetString(Res.ConfigKeysDoNotMatch), this.GetElementKey(value).ToString(), key.ToString())); } } }
public WsiProfilesElement this[object key] { get { if (key == null) { throw new ArgumentNullException("key"); } WsiProfilesElement element = (WsiProfilesElement)base.BaseGet(key); if (element == null) { throw new KeyNotFoundException(string.Format(CultureInfo.InvariantCulture, Res.GetString("ConfigKeyNotFoundInElementCollection"), new object[] { key.ToString() })); } return(element); } set { if (value == null) { throw new ArgumentNullException("value"); } if (key == null) { throw new ArgumentNullException("key"); } if (!this.GetElementKey(value).Equals(key)) { throw new ArgumentException(string.Format(CultureInfo.InvariantCulture, Res.GetString("ConfigKeysDoNotMatch"), new object[] { this.GetElementKey(value).ToString(), key.ToString() })); } if (base.BaseGet(key) != null) { base.BaseRemove(key); } this.Add(value); } }
public int IndexOf (WsiProfilesElement element) { return BaseIndexOf (element); }
public void Remove (WsiProfilesElement element) { BaseRemove (element.Name); }
public void Add (WsiProfilesElement element) { BaseAdd (element); }
public void CopyTo (WsiProfilesElement[] array, int index) { ((ICollection)this).CopyTo (array, index); }
internal void SetDefaults() { WsiProfilesElement basic10Element = new WsiProfilesElement(WsiProfiles.BasicProfile1_1); this.Add(basic10Element); }
internal void SetDefaults() { WsiProfilesElement element = new WsiProfilesElement(WsiProfiles.BasicProfile1_1); this.Add(element); }
public void Add(WsiProfilesElement element) { BaseAdd(element); }
public int IndexOf(WsiProfilesElement element) { return(BaseIndexOf(element)); }
public void Remove(WsiProfilesElement element) { BaseRemove(element.Name); }