public int IndexOf(SoapExtensionTypeElement element) { if (element == null) { throw new ArgumentNullException("element"); } return base.BaseIndexOf(element); }
public void Remove(SoapExtensionTypeElement element) { if (element == null) { throw new ArgumentNullException("element"); } base.BaseRemove(this.GetElementKey(element)); }
public void Add(SoapExtensionTypeElement element) { if (element == null) { throw new ArgumentNullException("element"); } this.BaseAdd(element); }
public void CopyTo(SoapExtensionTypeElement[] array, int index) { if (array == null) { throw new ArgumentNullException("array"); } ((ICollection) this).CopyTo(array, index); }
public void Remove(SoapExtensionTypeElement element) { if (element == null) { throw new ArgumentNullException("element"); } base.BaseRemove(this.GetElementKey(element)); }
public int IndexOf(SoapExtensionTypeElement element) { if (element == null) { throw new ArgumentNullException("element"); } return(base.BaseIndexOf(element)); }
public void Add(SoapExtensionTypeElement element) { if (element == null) { throw new ArgumentNullException("element"); } this.BaseAdd(element); }
public void GetSet () { SoapExtensionTypeElement el = new SoapExtensionTypeElement (); el.Group = PriorityGroup.High; Assert.AreEqual (PriorityGroup.High, el.Group, "A1"); el.Priority = 2; Assert.AreEqual (2, el.Priority, "A2"); el.Type = typeof (string); Assert.AreEqual (typeof (string), el.Type, "A3"); }
public SoapExtensionTypeElement this [object key] { get { return((SoapExtensionTypeElement)BaseGet(key)); } set { SoapExtensionTypeElement el = (SoapExtensionTypeElement)BaseGet(key); if (el == null) { BaseAdd(value); return; } int index = IndexOf(el); BaseRemoveAt(index); BaseAdd(index, value); } }
public SoapExtensionTypeElement this[object key] { get { if (key == null) { throw new ArgumentNullException("key"); } SoapExtensionTypeElement retval = (SoapExtensionTypeElement)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 void Ctors () { SoapExtensionTypeElement el = new SoapExtensionTypeElement (); Assert.AreEqual (PriorityGroup.Low, el.Group, "A1"); Assert.AreEqual (0, el.Priority, "A2"); Assert.IsNull (el.Type, "A3"); el = new SoapExtensionTypeElement (typeof (string), 5, PriorityGroup.High); Assert.AreEqual (PriorityGroup.High, el.Group, "A4"); Assert.AreEqual (5, el.Priority, "A5"); Assert.AreEqual (typeof (string), el.Type, "A6"); el = new SoapExtensionTypeElement ("System.String", 5, PriorityGroup.High); Assert.AreEqual (PriorityGroup.High, el.Group, "A7"); Assert.AreEqual (5, el.Priority, "A8"); Assert.AreEqual (typeof (string), el.Type, "A9"); }
public SoapExtensionTypeElement this[object key] { get { if (key == null) { throw new ArgumentNullException("key"); } SoapExtensionTypeElement element = (SoapExtensionTypeElement)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 void Add (SoapExtensionTypeElement element) { BaseAdd (element); }
public void Remove(SoapExtensionTypeElement element) { BaseRemove(element.GetKey()); }
public int IndexOf(SoapExtensionTypeElement element) { return(BaseIndexOf(element)); }
public void Add(SoapExtensionTypeElement element) { BaseAdd(element); }
public void Remove (SoapExtensionTypeElement element) { BaseRemove (element.GetKey()); }
public int IndexOf (SoapExtensionTypeElement element) { return BaseIndexOf (element); }
public void PriorityValidator1 () { SoapExtensionTypeElement el = new SoapExtensionTypeElement (); el.Priority = -1; }
public void PriorityValidator2 () { SoapExtensionTypeElement el = new SoapExtensionTypeElement (); el.Priority = 0; el.Priority = Int32.MaxValue; }
public void CopyTo (SoapExtensionTypeElement[] array, int index) { ((ICollection)this).CopyTo (array, index); }