Skip to content

Exomia.Network.Extensions.Struct

Daniel Baetz edited this page Jul 26, 2019 · 6 revisions

FromBytesExtension

from bytes extensions.

public static class Exomia.Network.Extensions.Struct.FromBytesExtension

Static Methods

void FromBytes(this Byte[] arr, T& obj)

Summary:

converts a byte array into a struct.

Parameter:

  • arr - The byte array.
  • obj - [out] out struct.

void FromBytes(this Byte[] arr, Int32 offset, T& obj)

Summary:

converts a byte array into a struct.

Parameter:

  • arr - The byte array.
  • offset - The offset.
  • obj - [out] out struct.

T FromBytes(this Byte[] arr)

Summary:

converts a byte array into a struct.

Parameter:

  • arr - The byte array.

T FromBytes(this Byte[] arr, Int32 offset)

Summary:

converts a byte array into a struct.

Parameter:

  • arr - The byte array.
  • offset - The offset.

void FromBytesUnsafe(this Byte[] arr, T& obj)

Summary:

converts a byte array into a struct.

Parameter:

  • arr - The byte array.
  • obj - [out] out struct.

void FromBytesUnsafe(this Byte[] arr, Int32 offset, T& obj)

Summary:

converts a byte array into a struct.

Parameter:

  • arr - The byte array.
  • offset - The offset.
  • obj - [out] out struct.

T FromBytesUnsafe(this Byte[] arr)

Summary:

converts a byte array into a struct.

Parameter:

  • arr - The byte array.

T FromBytesUnsafe(this Byte[] arr, Int32 offset)

Summary:

converts a byte array into a struct.

Parameter:

  • arr - The byte array.
  • offset - The offset.

void FromBytesUnsafe2(this Byte[] arr, T& obj)

Summary:

converts a byte array into a struct.

Parameter:

  • arr - The byte array.
  • obj - [out] out struct.

void FromBytesUnsafe2(this Byte[] arr, Int32 offset, T& obj)

Summary:

converts a byte array into a struct.

Parameter:

  • arr - The byte array.
  • offset - The offset.
  • obj - [out] out struct.

T FromBytesUnsafe2(this Byte[] arr)

Summary:

converts a byte array into a struct.

Parameter:

  • arr - The byte array.

T FromBytesUnsafe2(this Byte[] arr, Int32 offset)

Summary:

converts a byte array into a struct.

Parameter:

  • arr - The byte array.
  • offset - The offset.


ToBytesExtension

to bytes extensions.

public static class Exomia.Network.Extensions.Struct.ToBytesExtension

Static Methods

Byte[] ToBytes(this T data, Int32& length)

Summary:

converts a struct into a byte array.

Parameter:

  • data - The data.
  • length - [out] out the size of T.

void ToBytes(this T data, Byte[]& arr, Int32& length)

Summary:

converts a struct into a byte array.

Parameter:

  • data - The data.
  • arr - [out] out byte array.
  • length - [out] out the size of T.

void ToBytes(this T data, Byte[]& arr, Int32 offset, Int32& length)

Summary:

converts a struct into a byte array.

Parameter:

  • data - The data.
  • arr - [in,out] ref byte array.
  • offset - offset.
  • length - [out] out the size of T.

Byte[] ToBytesUnsafe(this T data, Int32& length)

Summary:

converts a struct into a byte array.

Parameter:

  • data - The data.
  • length - [out] out the size of T.

void ToBytesUnsafe(this T data, Byte[]& arr, Int32& length)

Summary:

converts a struct into a byte array.

Parameter:

  • data - The data.
  • arr - [out] out byte array.
  • length - [out] out the size of T.

void ToBytesUnsafe(this T data, Byte[]& arr, Int32 offset, Int32& length)

Summary:

converts a struct into a byte array.

Parameter:

  • data - The data.
  • arr - [in,out] out byte array.
  • offset - offset.
  • length - [out] out the size of T.

Byte[] ToBytesUnsafe2(this T data, Int32& length)

Summary:

converts a struct into a byte array.

Parameter:

  • data - The data.
  • length - [out] out the size of T.

void ToBytesUnsafe2(this T data, Byte[]& arr, Int32& length)

Summary:

converts a struct into a byte array.

Parameter:

  • data - The data.
  • arr - [out] out byte array.
  • length - [out] out the size of T.

void ToBytesUnsafe2(this T data, Byte[]& arr, Int32 offset, Int32& length)

Summary:

converts a struct into a byte array.

Parameter:

  • data - The data.
  • arr - [in,out] out byte array.
  • offset - offset.
  • length - [out] out the size of T.