bool IList.Contains(object value) { TEntity _item = (TEntity)value; int _ret = GetIndex(_item); return(ItemsCollection.ContainsKey(_ret)); }
/// <summary> /// Indicates whether a specified entity is in the <see cref="Microsoft.SharePoint.Linq.EntitySet{TEntity}"/> /// </summary> /// <param name="value">The <see cref="T:System.Object" />The object whose presence is questioned.</param> /// <returns> /// Indicates whether a specified object is in the Microsoft.SharePoint.Linq.EntitySet. /// </returns> public bool Contains(TEntity value) { if (value == null) { throw new ArgumentNullException("value of IndexOf cannot be null"); } int _ret = GetIndex(value); return(ItemsCollection.ContainsKey(_ret)); }
internal override string GenerateName(string name, string path = "", bool isProg = false) { string generattingName = name; int i = 0; while (true) { if (!ItemsCollection.ContainsKey(generattingName)) { return(generattingName); } i++; generattingName = name + i; } }