Example #1
0
        protected override ILazinator AssignCloneProperties(ILazinator clone, IncludeChildrenMode includeChildrenMode)
        {
            base.AssignCloneProperties(clone, includeChildrenMode);
            LazinatorFastReadListInt16 typedClone = (LazinatorFastReadListInt16)clone;

            return(typedClone);
        }
Example #2
0
        public override ILazinator CloneLazinator(IncludeChildrenMode includeChildrenMode = IncludeChildrenMode.IncludeAllChildren, CloneBufferOptions cloneBufferOptions = CloneBufferOptions.IndependentBuffers)
        {
            LazinatorFastReadListInt16 clone;

            if (cloneBufferOptions == CloneBufferOptions.NoBuffer)
            {
                clone = new LazinatorFastReadListInt16(includeChildrenMode);
                clone = (LazinatorFastReadListInt16)AssignCloneProperties(clone, includeChildrenMode);
            }
            else
            {
                LazinatorMemory bytes = EncodeOrRecycleToNewBuffer(includeChildrenMode, OriginalIncludeChildrenMode, IsDirty, DescendantIsDirty, false, LazinatorMemoryStorage, this);
                clone = new LazinatorFastReadListInt16(bytes);
            }
            return(clone);
        }
Example #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);
     }
 }
Example #4
0
 private void LazinateTwoByteItems()
 {
     if (LazinatorMemoryStorage.Length == 0)
     {
         _TwoByteItems = null;
     }
     else
     {
         LazinatorMemory childData = GetChildSlice(LazinatorMemoryStorage, _TwoByteItems_ByteIndex, _TwoByteItems_ByteLength, null); if (childData.Length == 0)
         {
             _TwoByteItems = default;
         }
         else
         {
             _TwoByteItems = new LazinatorFastReadListInt16(childData)
             {
                 LazinatorParents = new LazinatorParentsCollection(this)
             };
         }
     }
     _TwoByteItems_Accessed = true;
 }