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