예제 #1
0
 public void Read(BinaryReader rd)
 {
     using (var sa = new StringStreamedArray(rd.BaseStream, null, true, false))
     {
         _array    = sa.ToArray();
         _encoding = sa.Encoding;
     }
 }
예제 #2
0
 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);
     }
 }
예제 #3
0
 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);
 }
예제 #4
0
 public void Read(BinaryReader rd)
 {
     using (var sa = new StringStreamedArray(rd.BaseStream, null, true, false))
         _list = sa.ToList();
 }