Example #1
0
        internal bool Contains(object item)
        {
            IBindableVector bindableVector = JitHelpers.UnsafeCast <IBindableVector>(this);
            uint            num;

            return(bindableVector.IndexOf(item, out num));
        }
Example #2
0
        internal bool Contains(object item)
        {
            IBindableVector _this = JitHelpers.UnsafeCast <IBindableVector>(this);

            uint index;

            return(_this.IndexOf(item, out index));
        }
Example #3
0
        // bool Contains(object item)
        internal bool Contains(object item)
        {
            IBindableVector _this = Unsafe.As <IBindableVector>(this);

            uint index;

            return(_this.IndexOf(item, out index));
        }
        // Token: 0x0600647A RID: 25722 RVA: 0x00154C28 File Offset: 0x00152E28
        bool IBindableVector.IndexOf(object value, out uint index)
        {
            IBindableVector ibindableVectorNoThrow = this.GetIBindableVectorNoThrow();

            if (ibindableVectorNoThrow != null)
            {
                return(ibindableVectorNoThrow.IndexOf(value, out index));
            }
            return(this.GetVectorOfT().IndexOf(ICustomPropertyProviderProxy <T1, T2> .ConvertTo <T1>(value), out index));
        }
Example #5
0
        bool IBindableVector.IndexOf(object value, out uint index)
        {
            IBindableVector bindableVector = GetIBindableVectorNoThrow();

            if (bindableVector != null)
            {
                // IBindableVector -> IBindableVector
                return(bindableVector.IndexOf(value, out index));
            }
            else
            {
                // IBindableVector -> IVector<T>
                return(GetVectorOfT().IndexOf(ConvertTo <T1>(value), out index));
            }
        }
Example #6
0
        internal int IndexOf(object item)
        {
            IBindableVector bindableVector = JitHelpers.UnsafeCast <IBindableVector>(this);
            uint            num;

            if (!bindableVector.IndexOf(item, out num))
            {
                return(-1);
            }
            if (2147483647U < num)
            {
                throw new InvalidOperationException(Environment.GetResourceString("InvalidOperation_CollectionBackingListTooLarge"));
            }
            return((int)num);
        }
Example #7
0
        internal void Remove(object item)
        {
            IBindableVector bindableVector = JitHelpers.UnsafeCast <IBindableVector>(this);
            uint            num;
            bool            flag = bindableVector.IndexOf(item, out num);

            if (flag)
            {
                if (2147483647U < num)
                {
                    throw new InvalidOperationException(Environment.GetResourceString("InvalidOperation_CollectionBackingListTooLarge"));
                }
                BindableVectorToListAdapter.RemoveAtHelper(bindableVector, num);
            }
        }
Example #8
0
        internal void Remove(object item)
        {
            IBindableVector _this = JitHelpers.UnsafeCast <IBindableVector>((object)this);
            uint            index;

            if (!_this.IndexOf(item, out index))
            {
                return;
            }
            if ((uint)int.MaxValue < index)
            {
                throw new InvalidOperationException(Environment.GetResourceString("InvalidOperation_CollectionBackingListTooLarge"));
            }
            BindableVectorToListAdapter.RemoveAtHelper(_this, index);
        }
        // bool Remove(object item)
        internal void Remove(object item)
        {
            IBindableVector _this = Unsafe.As <IBindableVector>(this);

            bool exists = _this.IndexOf(item, out uint index);

            if (exists)
            {
                if (((uint)int.MaxValue) < index)
                {
                    throw new InvalidOperationException(SR.InvalidOperation_CollectionBackingListTooLarge);
                }

                RemoveAtHelper(_this, index);
            }
        }
Example #10
0
        internal void Remove(object item)
        {
            IBindableVector _this = JitHelpers.UnsafeCast <IBindableVector>(this);

            uint index;
            bool exists = _this.IndexOf(item, out index);

            if (exists)
            {
                if (((uint)Int32.MaxValue) < index)
                {
                    throw new InvalidOperationException(Environment.GetResourceString("InvalidOperation_CollectionBackingListTooLarge"));
                }

                RemoveAtHelper(_this, index);
            }
        }
        // int IndexOf(object item)
        internal int IndexOf(object item)
        {
            IBindableVector _this = Unsafe.As <IBindableVector>(this);

            bool exists = _this.IndexOf(item, out uint index);

            if (!exists)
            {
                return(-1);
            }

            if (((uint)int.MaxValue) < index)
            {
                throw new InvalidOperationException(SR.InvalidOperation_CollectionBackingListTooLarge);
            }

            return((int)index);
        }