/// <summary> /// Removes the specified item. /// </summary> /// <param name="item">The item.</param> void IList.Remove(object item) { if (EventedList <T> .IsCompatibleObject(item)) { Remove((T)item); } }
/// <summary> /// Verifies the type of the value. /// </summary> /// <param name="value">The value.</param> private static void VerifyValueType(object value) { if (!EventedList <T> .IsCompatibleObject(value)) { throw new ArgumentException("Incompatible object", nameof(value)); } }
/// <summary> /// Indexes the of. /// </summary> /// <param name="item">The item.</param> /// <returns></returns> int IList.IndexOf(object item) { if (EventedList <T> .IsCompatibleObject(item)) { return(IndexOf((T)item)); } return(-1); }
/// <summary> /// Determines whether [contains] [the specified item]. /// </summary> /// <param name="item">The item.</param> /// <returns> /// <c>true</c> if [contains] [the specified item]; otherwise, <c>false</c>. /// </returns> bool IList.Contains(object item) => (EventedList <T> .IsCompatibleObject(item) && Contains((T)item));
/// <summary> /// Determines whether [contains] [the specified item]. /// </summary> /// <param name="item">The item.</param> /// <returns> /// <c>true</c> if [contains] [the specified item]; otherwise, <c>false</c>. /// </returns> bool IList.Contains(object item) { return(EventedList <T> .IsCompatibleObject(item) && this.Contains((T)item)); }