C# Class org.GraphDefined.Vanaheimr.Illias.ByteExtensions

Extensions for byte and byte arrays.
Mostrar archivo Open project: Vanaheimr/Illias

Public Properties

Property Type Description
UNIXTime System.DateTime

Public Methods

Method Description
HexStringToByteArray ( this HexValue ) : Byte[]
Reverse ( this ByteArray ) : Byte[]

Reverse the given byte array.

Reverse ( this ByteArray, UInt32 Skip, UInt32 Take ) : Byte[]

Reverse the given byte array.

ToDateTime32s ( this IEnumerable, System.Boolean NetworkByteOrder = true ) : IEnumerable

Converts the given enumeration of four enumerated bytes into an enumeration of DateTimes.

ToDateTime64s ( this IEnumerable, System.Boolean NetworkByteOrder = true ) : IEnumerable

Converts the given enumeration of eight enumerated bytes into an enumeration of DateTimes.

ToDoubles ( this IEnumerable, System.Boolean NetworkByteOrder = true ) : IEnumerable

Converts the given enumeration of enumerated bytes into an enumeration of Doubles.

ToHexString ( this ByteArray, System.Boolean ToLower = true ) : String

Converts an array of bytes into its hexadecimal string representation.

ToInt16s ( this IEnumerable, System.Boolean NetworkByteOrder = true ) : IEnumerable

Converts the given enumeration of enumerated bytes into an enumeration of Int16s.

ToInt32s ( this IEnumerable, System.Boolean NetworkByteOrder = true ) : IEnumerable

Converts the given enumeration of enumerated bytes into an enumeration of Int32s.

ToInt64s ( this IEnumerable, System.Boolean NetworkByteOrder = true ) : IEnumerable

Converts the given enumeration of enumerated bytes into an enumeration of Int64s.

ToSingles ( this IEnumerable, System.Boolean NetworkByteOrder = true ) : IEnumerable

Converts the given enumeration of enumerated bytes into an enumeration of Singles.

ToUInt16s ( this IEnumerable, System.Boolean NetworkByteOrder = true ) : IEnumerable

Converts the given enumeration of enumerated bytes into an enumeration of UInt16s.

ToUInt32s ( this IEnumerable, System.Boolean NetworkByteOrder = true ) : IEnumerable

Converts the given enumeration of enumerated bytes into an enumeration of UInt32s.

ToUInt64s ( this IEnumerable, System.Boolean NetworkByteOrder = true ) : IEnumerable

Converts the given enumeration of enumerated bytes into an enumeration of UInt64s.

Write ( this Stream, Byte ByteArray ) : void

Method Details

HexStringToByteArray() public static method

public static HexStringToByteArray ( this HexValue ) : Byte[]
HexValue this
return Byte[]

Reverse() public static method

Reverse the given byte array.
public static Reverse ( this ByteArray ) : Byte[]
ByteArray this An array of bytes.
return Byte[]

Reverse() public static method

Reverse the given byte array.
public static Reverse ( this ByteArray, UInt32 Skip, UInt32 Take ) : Byte[]
ByteArray this An array of bytes.
Skip System.UInt32 Skip the given number of bytes in the beginning.
Take System.UInt32 Take the given number of bytes.
return Byte[]

ToDateTime32s() public static method

Converts the given enumeration of four enumerated bytes into an enumeration of DateTimes.
public static ToDateTime32s ( this IEnumerable, System.Boolean NetworkByteOrder = true ) : IEnumerable
IEnumerable this An enumeration of enumerated bytes.
NetworkByteOrder System.Boolean Whether the bytes are enumerated in network byte order (default) or not.
return IEnumerable

ToDateTime64s() public static method

Converts the given enumeration of eight enumerated bytes into an enumeration of DateTimes.
public static ToDateTime64s ( this IEnumerable, System.Boolean NetworkByteOrder = true ) : IEnumerable
IEnumerable this An enumeration of enumerated bytes.
NetworkByteOrder System.Boolean Whether the bytes are enumerated in network byte order (default) or not.
return IEnumerable

ToDoubles() public static method

Converts the given enumeration of enumerated bytes into an enumeration of Doubles.
public static ToDoubles ( this IEnumerable, System.Boolean NetworkByteOrder = true ) : IEnumerable
IEnumerable this An enumeration of enumerated bytes.
NetworkByteOrder System.Boolean Whether the bytes are enumerated in network byte order (default) or not.
return IEnumerable

ToHexString() public static method

Converts an array of bytes into its hexadecimal string representation.
public static ToHexString ( this ByteArray, System.Boolean ToLower = true ) : String
ByteArray this An array of bytes.
ToLower System.Boolean
return String

ToInt16s() public static method

Converts the given enumeration of enumerated bytes into an enumeration of Int16s.
public static ToInt16s ( this IEnumerable, System.Boolean NetworkByteOrder = true ) : IEnumerable
IEnumerable this An enumeration of enumerated bytes.
NetworkByteOrder System.Boolean Whether the bytes are enumerated in network byte order (default) or not.
return IEnumerable

ToInt32s() public static method

Converts the given enumeration of enumerated bytes into an enumeration of Int32s.
public static ToInt32s ( this IEnumerable, System.Boolean NetworkByteOrder = true ) : IEnumerable
IEnumerable this An enumeration of enumerated bytes.
NetworkByteOrder System.Boolean Whether the bytes are enumerated in network byte order (default) or not.
return IEnumerable

ToInt64s() public static method

Converts the given enumeration of enumerated bytes into an enumeration of Int64s.
public static ToInt64s ( this IEnumerable, System.Boolean NetworkByteOrder = true ) : IEnumerable
IEnumerable this An enumeration of enumerated bytes.
NetworkByteOrder System.Boolean Whether the bytes are enumerated in network byte order (default) or not.
return IEnumerable

ToSingles() public static method

Converts the given enumeration of enumerated bytes into an enumeration of Singles.
public static ToSingles ( this IEnumerable, System.Boolean NetworkByteOrder = true ) : IEnumerable
IEnumerable this An enumeration of enumerated bytes.
NetworkByteOrder System.Boolean Whether the bytes are enumerated in network byte order (default) or not.
return IEnumerable

ToUInt16s() public static method

Converts the given enumeration of enumerated bytes into an enumeration of UInt16s.
public static ToUInt16s ( this IEnumerable, System.Boolean NetworkByteOrder = true ) : IEnumerable
IEnumerable this An enumeration of enumerated bytes.
NetworkByteOrder System.Boolean Whether the bytes are enumerated in network byte order (default) or not.
return IEnumerable

ToUInt32s() public static method

Converts the given enumeration of enumerated bytes into an enumeration of UInt32s.
public static ToUInt32s ( this IEnumerable, System.Boolean NetworkByteOrder = true ) : IEnumerable
IEnumerable this An enumeration of enumerated bytes.
NetworkByteOrder System.Boolean Whether the bytes are enumerated in network byte order (default) or not.
return IEnumerable

ToUInt64s() public static method

Converts the given enumeration of enumerated bytes into an enumeration of UInt64s.
public static ToUInt64s ( this IEnumerable, System.Boolean NetworkByteOrder = true ) : IEnumerable
IEnumerable this An enumeration of enumerated bytes.
NetworkByteOrder System.Boolean Whether the bytes are enumerated in network byte order (default) or not.
return IEnumerable

Write() public static method

public static Write ( this Stream, Byte ByteArray ) : void
Stream this
ByteArray Byte
return void

Property Details

UNIXTime public_oe static_oe property

The beginning of the UNIX universe.
public static DateTime,System UNIXTime
return System.DateTime