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);
     }
 }
示例#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);
     }
 }
示例#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);
     }
 }
示例#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);
     }
 }