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