protected override ILazinator AssignCloneProperties(ILazinator clone, IncludeChildrenMode includeChildrenMode) { base.AssignCloneProperties(clone, includeChildrenMode); LazinatorFastReadListInt16 typedClone = (LazinatorFastReadListInt16)clone; return(typedClone); }
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); }
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); } }
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; }