示例#1
0
 /// <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);
     }
 }
示例#2
0
 /// <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));
     }
 }
示例#3
0
 /// <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);
 }
示例#4
0
 /// <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));
示例#5
0
 /// <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));
 }