示例#1
0
        bool IList.Contains(object value)
        {
            TEntity _item = (TEntity)value;
            int     _ret  = GetIndex(_item);

            return(ItemsCollection.ContainsKey(_ret));
        }
示例#2
0
        /// <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));
        }
示例#3
0
        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;
            }
        }