Exemple #1
0
        public RetainedVec(RetainedVec storage)
        {
            if (VecTypeHelper <T> .RuntimeTypeId != storage.Vec.RuntimeTypeId)
            {
                VecThrowHelper.ThrowVecTypeMismatchException();
            }

            Storage = storage;
        }
Exemple #2
0
        internal Vector(VectorStorage vectorStorage)
        {
            var vtidx = VecTypeHelper <T> .RuntimeVecInfo.RuntimeTypeId;

            if (vtidx != vectorStorage.Vec._runtimeTypeId)
            {
                VecThrowHelper.ThrowVecTypeMismatchException();
            }
            _vectorStorage = vectorStorage;
        }
Exemple #3
0
        //[MethodImpl(MethodImplOptions.AggressiveInlining)]
        //public Vector<T> As<T>()
        //{
        //    return _vectorStorage.GetVector<T>();
        //}

        public object this[int index]
        {
            [MethodImpl(MethodImplOptions.AggressiveInlining)]
            get
            {
                if (unchecked ((uint)index) >= unchecked ((uint)VecStorage.Vec.Length))
                {
                    VecThrowHelper.ThrowIndexOutOfRangeException();
                }
                return(VecStorage.Vec.DangerousGet(index));
            }
        }