public void Read(BinaryReader rd) { using (var sa = new StringStreamedCollection(rd.BaseStream, null, true, false)) { _list = sa.ToList(); _encoding = sa.Encoding; } }
public void Write(BinaryWriter wr) { using (var ms = new MemoryStream()) using (var sa = new StringStreamedCollection(ms, SizeEncoding.B4, SizeEncoding.B4, _encoding, null, _list, true, false)) wr.Write(ms.GetBuffer(), 0, (int)ms.Length); }