Exemplo n.º 1
0
        protected override ILazinator AssignCloneProperties(ILazinator clone, IncludeChildrenMode includeChildrenMode)
        {
            base.AssignCloneProperties(clone, includeChildrenMode);
            LazinatorFastReadListInt32 typedClone = (LazinatorFastReadListInt32)clone;

            return(typedClone);
        }
Exemplo n.º 2
0
        public override ILazinator CloneLazinator(IncludeChildrenMode includeChildrenMode = IncludeChildrenMode.IncludeAllChildren, CloneBufferOptions cloneBufferOptions = CloneBufferOptions.IndependentBuffers)
        {
            LazinatorFastReadListInt32 clone;

            if (cloneBufferOptions == CloneBufferOptions.NoBuffer)
            {
                clone = new LazinatorFastReadListInt32(includeChildrenMode);
                clone = (LazinatorFastReadListInt32)AssignCloneProperties(clone, includeChildrenMode);
            }
            else
            {
                LazinatorMemory bytes = EncodeOrRecycleToNewBuffer(includeChildrenMode, OriginalIncludeChildrenMode, IsDirty, DescendantIsDirty, false, LazinatorMemoryStorage, this);
                clone = new LazinatorFastReadListInt32(bytes);
            }
            return(clone);
        }
Exemplo n.º 3
0
 public void AddOffset(int offset)
 {
     if (offset <= short.MaxValue)
     {
         if (TwoByteItems == null)
         {
             TwoByteItems = new LazinatorFastReadListInt16();
         }
         TwoByteItems.AsList.Add((short)offset);
     }
     else
     {
         if (FourByteItems == null)
         {
             FourByteItems = new LazinatorFastReadListInt32();
         }
         FourByteItems.AsList.Add(offset);
     }
 }
Exemplo n.º 4
0
 private void LazinateFourByteItems()
 {
     if (LazinatorMemoryStorage.Length == 0)
     {
         _FourByteItems = null;
     }
     else
     {
         LazinatorMemory childData = GetChildSlice(LazinatorMemoryStorage, _FourByteItems_ByteIndex, _FourByteItems_ByteLength, null); if (childData.Length == 0)
         {
             _FourByteItems = default;
         }
         else
         {
             _FourByteItems = new LazinatorFastReadListInt32(childData)
             {
                 LazinatorParents = new LazinatorParentsCollection(this)
             };
         }
     }
     _FourByteItems_Accessed = true;
 }