internal RawBinaryWriter(IWriterBuffer lengthBuffer, IWriterBuffer dataBuffer, List <Memory <byte> > lengthSegments) { _lengthBuffer = lengthBuffer; _dataBuffer = dataBuffer; _lengthSegments = lengthSegments; _containerStack = new ContainerStack(DefaultContainerStackSize); //top-level writing also requires a tracker var pushedContainer = _containerStack.PushContainer(ContainerType.Datagram); _dataBuffer.StartStreak(pushedContainer.Sequence); }
internal RawBinaryWriter(IWriterBuffer lengthBuffer, IWriterBuffer dataBuffer, List <Memory <byte> > lengthSegments, bool forceFloat64) { this.lengthBuffer = lengthBuffer; this.dataBuffer = dataBuffer; this.lengthSegments = lengthSegments; this.containerStack = new ContainerStack(DefaultContainerStackSize); this.forceFloat64 = forceFloat64; // Top-level writing also requires a tracker var pushedContainer = this.containerStack.PushContainer(ContainerType.Datagram); this.dataBuffer.StartStreak(pushedContainer.Sequence); }