public override uint CurrentLength => (uint)writer.BaseStream.Length; // can be modified! protected void SwitchToFile(BinaryFile newFile) { if (newFile == null) { return; } if (!writers.ContainsKey(newFile)) { writers.Add(newFile, newFile.CreateWriter()); } writer = writers[newFile]; currentFile = newFile; }