public static void Write(this byte[] buffer, int offset, UInt128 value, Endianity endianity)
 {
     if (ByteArrayExtensions.IsWrongEndianity(endianity))
     {
         value = ByteArrayExtensions.HostToNetworkOrder(value);
     }
     ByteArrayExtensions.Write(buffer, offset, value);
 }
 public static void Write(this byte[] buffer, ref int offset, string value, Encoding encoding)
 {
     if (encoding == null)
     {
         throw new ArgumentNullException("encoding");
     }
     ByteArrayExtensions.Write(buffer, ref offset, (IEnumerable <byte>)encoding.GetBytes(value));
 }
 public static void Write(this byte[] buffer, int offset, short value, Endianity endianity)
 {
     if (ByteArrayExtensions.IsWrongEndianity(endianity))
     {
         value = ShortExtensions.ReverseEndianity(value);
     }
     ByteArrayExtensions.Write(buffer, offset, value);
 }
 public static void Write(this byte[] buffer, ref int offset, IEnumerable <byte> value)
 {
     if (buffer == null)
     {
         throw new ArgumentNullException("buffer");
     }
     if (value == null)
     {
         throw new ArgumentNullException("value");
     }
     foreach (byte num in value)
     {
         ByteArrayExtensions.Write(buffer, offset++, num);
     }
 }
 public static void WriteDecimal(this byte[] buffer, ref int offset, uint value)
 {
     ByteArrayExtensions.Write(buffer, ref offset, value.ToString((IFormatProvider)CultureInfo.InvariantCulture), Encoding.ASCII);
 }
 public static void WriteCarriageReturnLinefeed(this byte[] buffer, ref int offset)
 {
     ByteArrayExtensions.Write(buffer, ref offset, (byte)13);
     ByteArrayExtensions.Write(buffer, ref offset, (byte)10);
 }
 public static void Write(this byte[] buffer, int offset, IpV6Address value, Endianity endianity)
 {
     ByteArrayExtensions.Write(buffer, offset, value.ToValue(), endianity);
 }
 public static void Write(this byte[] buffer, ref int offset, IpV4TimeOfDay value, Endianity endianity)
 {
     ByteArrayExtensions.Write(buffer, ref offset, value.MillisecondsSinceMidnightUniversalTime, endianity);
 }
 public static void Write(this byte[] buffer, int offset, DataSegment value)
 {
     ByteArrayExtensions.Write(buffer, ref offset, value);
 }
 public static void Write(this byte[] buffer, int offset, ulong value, Endianity endianity)
 {
     ByteArrayExtensions.Write(buffer, offset, (long)value, endianity);
 }
 public static void Write(this byte[] buffer, ref int offset, UInt48 value, Endianity endianity)
 {
     ByteArrayExtensions.Write(buffer, offset, value, endianity);
     offset += 6;
 }
 public static void Write(this byte[] buffer, ref int offset, byte value)
 {
     ByteArrayExtensions.Write(buffer, offset, value);
     ++offset;
 }