public void Write(byte[] buffer, int index, object value)
 {
     if (value is null)
     {
         BytesHelper.Fill(buffer, index, length, filler);
     }
     else
     {
         BytesHelper.CopyBytes(encoding.GetBytes((string)value), buffer, index, length, padding, filler);
     }
 }
Esempio n. 2
0
 public void Write(byte[] buffer, int index, object value)
 {
     if (value is null)
     {
         BytesHelper.Fill(buffer, index, length, filler);
     }
     else
     {
         BytesHelper.CopyBytes(encoding.GetBytes(((int)value).ToString(format, provider)), buffer, index, length, padding, filler);
     }
 }
Esempio n. 3
0
 public void Write(byte[] buffer, int index, object value)
 {
     if (value is null)
     {
         BytesHelper.Fill(buffer, index, length, filler);
     }
     else
     {
         var bytes = (byte[])value;
         BytesHelper.CopyBytes(bytes, buffer, index, length, Padding.Right, filler);
     }
 }
Esempio n. 4
0
 public void Write(byte[] buffer, int index, object value)
 {
     if (value is null)
     {
         BytesHelper.Fill(buffer, index, length, filler);
     }
     else
     {
         var bytes = encoding.GetBytes(((DateTime)value).ToString(format, provider));
         BytesHelper.CopyBytes(bytes, buffer, index, length, Padding.Right, filler);
     }
 }