Class FixTypes
FIX Types helper class. Provides ability for parsing values from buffer of bytes.
Inheritance
Inherited Members
Namespace: FixAntenna.Fix.Message
Assembly: FixAntenna.Message.dll
Syntax
public sealed class FixTypes
Fields
MaxPrecision
Declaration
public const int MaxPrecision = 16
Field Value
Type | Description |
---|---|
System.Int32 |
Methods
FormatBackupStorageTimestamp(Byte[], DateTime, Int64, TimestampPrecision)
Declaration
public static byte[] FormatBackupStorageTimestamp(byte[] buffer, DateTime calendar, long additionalFractions, TimestampPrecision precision)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buffer | |
System.DateTime | calendar | |
System.Int64 | additionalFractions | |
TimestampPrecision | precision |
Returns
Type | Description |
---|---|
System.Byte[] |
FormatBoolean(Boolean)
Formats the boolean value
.
Declaration
public static byte[] FormatBoolean(bool value)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | value | the value |
Returns
Type | Description |
---|---|
System.Byte[] |
FormatCheckSum(Int32)
Formats the check sum.
Declaration
public static byte[] FormatCheckSum(int checkSum)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | checkSum | the check sum |
Returns
Type | Description |
---|---|
System.Byte[] | formated string |
FormatDate(DateTime)
Formats the value of calendar
to the Date
format.
The format for Date
is YYYYMMDD.
Declaration
public static byte[] FormatDate(DateTime calendar)
Parameters
Type | Name | Description |
---|---|---|
System.DateTime | calendar | the calendar |
Returns
Type | Description |
---|---|
System.Byte[] |
FormatDouble(Double)
Formats the double
value.
Declaration
public static byte[] FormatDouble(double value)
Parameters
Type | Name | Description |
---|---|---|
System.Double | value | the value |
Returns
Type | Description |
---|---|
System.Byte[] |
FormatDoubleWithPadding(Double, Int32, Int32, Byte[], Int32)
Declaration
public static void FormatDoubleWithPadding(double value, int precision, int padLength, byte[] buffer, int offset)
Parameters
Type | Name | Description |
---|---|---|
System.Double | value | |
System.Int32 | precision | |
System.Int32 | padLength | |
System.Byte[] | buffer | |
System.Int32 | offset |
FormatInt(Int64)
Formats the integer value.
Declaration
public static byte[] FormatInt(long value)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | value | the value |
Returns
Type | Description |
---|---|
System.Byte[] | the buffer |
FormatInt(Int64, Byte[])
Declaration
public static int FormatInt(long value, byte[] buffer)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | value | |
System.Byte[] | buffer |
Returns
Type | Description |
---|---|
System.Int32 |
FormatInt(Int64, Byte[], Int32)
Declaration
public static int FormatInt(long value, byte[] buffer, int offset)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | value | |
System.Byte[] | buffer | |
System.Int32 | offset |
Returns
Type | Description |
---|---|
System.Int32 |
FormatIntLength(Int64, Int32)
Calculates length (number of bytes) required to store provided value.
Declaration
public static int FormatIntLength(long value, int minLen = 1)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | value | Value to calculate length. |
System.Int32 | minLen | Minimum length of the value, optional. |
Returns
Type | Description |
---|---|
System.Int32 | Returns length (number of bytes) required to store provided value considering minimal length. |
FormatIntLengthWithPadding(Int64, Int32)
Declaration
public static int FormatIntLengthWithPadding(long value, int padLength)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | value | |
System.Int32 | padLength |
Returns
Type | Description |
---|---|
System.Int32 |
FormatIntWithPadding(Int64, Int32, Span<Byte>)
Declaration
public static int FormatIntWithPadding(long value, int padLength, Span<byte> buffer)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | value | |
System.Int32 | padLength | |
System.Span<System.Byte> | buffer |
Returns
Type | Description |
---|---|
System.Int32 |
FormatLocalMktDate(DateTime)
Formats the value of calendar
to the LocalMktDate
format.
The format for LocalMktDate
is YYYYMMDD.
Declaration
public static byte[] FormatLocalMktDate(DateTime calendar)
Parameters
Type | Name | Description |
---|---|---|
System.DateTime | calendar | the calendar |
Returns
Type | Description |
---|---|
System.Byte[] |
FormatMonthYear(DateTime)
Formats the value of calendar
to the MonthYear
format.
The format for MonthYear
is YYYYMM.
Declaration
public static byte[] FormatMonthYear(DateTime calendar)
Parameters
Type | Name | Description |
---|---|---|
System.DateTime | calendar | the calendar |
Returns
Type | Description |
---|---|
System.Byte[] |
FormatMonthYear44(DateTime)
Formats the MonthYear44
value from calendar
.
The format for MonthYear44
are YYYYMM, YYYYMMDD and YYYYMMWW.
Declaration
public static byte[] FormatMonthYear44(DateTime calendar)
Parameters
Type | Name | Description |
---|---|---|
System.DateTime | calendar | the calendar |
Returns
Type | Description |
---|---|
System.Byte[] |
Exceptions
Type | Condition |
---|---|
System.ArgumentException |
FormatStorageTimestamp(Byte[], Int32, DateTime, Int64, TimestampPrecision)
Declaration
public static byte[] FormatStorageTimestamp(byte[] buffer, int offset, DateTime calendar, long additionalFractions, TimestampPrecision precision)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buffer | |
System.Int32 | offset | |
System.DateTime | calendar | |
System.Int64 | additionalFractions | |
TimestampPrecision | precision |
Returns
Type | Description |
---|---|
System.Byte[] |
FormatTime(DateTime)
Formats the value of calendar
to the Time
format.
The format for Time
is YYYYMMDD-HH:MM:SS.
Declaration
public static byte[] FormatTime(DateTime calendar)
Parameters
Type | Name | Description |
---|---|---|
System.DateTime | calendar | the calendar |
Returns
Type | Description |
---|---|
System.Byte[] |
FormatTimestamp(Byte[], Int32, DateTime, Int64, TimestampPrecision)
Declaration
public static byte[] FormatTimestamp(byte[] buffer, int offset, DateTime calendar, long additionalFractions, TimestampPrecision precision)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buffer | |
System.Int32 | offset | |
System.DateTime | calendar | |
System.Int64 | additionalFractions | |
TimestampPrecision | precision |
Returns
Type | Description |
---|---|
System.Byte[] |
formatTZTimeOnly(DateTimeOffset)
Formats the value of calendar
to the TZTimeOnly
format.
The format for TZTimeOnly
is HH:MM[:SS][.sss][Z | [ + | - hh[:mm]]].
Declaration
public static byte[] formatTZTimeOnly(DateTimeOffset calendar)
Parameters
Type | Name | Description |
---|---|---|
System.DateTimeOffset | calendar | the value |
Returns
Type | Description |
---|---|
System.Byte[] |
FormatTzTimestamp(DateTimeOffset, TimestampPrecision)
Formats the value of calendar
to the TZTimestamp
format.
The format for TZTimestamp
is YYYYMMDD-HH:MM[:SS[.sss]][Z | [ + | - hh[:mm]]].
Declaration
public static byte[] FormatTzTimestamp(DateTimeOffset calendar, TimestampPrecision precision)
Parameters
Type | Name | Description |
---|---|---|
System.DateTimeOffset | calendar | the calendar |
TimestampPrecision | precision |
Returns
Type | Description |
---|---|
System.Byte[] |
FormatUInt(Int64)
Formats the integer value.
Declaration
public static byte[] FormatUInt(long value)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | value | the value |
Returns
Type | Description |
---|---|
System.Byte[] | the buffer |
FormatUtcDate(DateTime)
Formats the value of calendar
to the UTCDate
format.
The format for UTCDate
is YYYYMMDD.
Declaration
public static byte[] FormatUtcDate(DateTime calendar)
Parameters
Type | Name | Description |
---|---|---|
System.DateTime | calendar | the calendar |
Returns
Type | Description |
---|---|
System.Byte[] |
formatUTCTimeOnly(DateTime, TimestampPrecision)
Formats the value of calendar
to the UTCTimeOnly
format.
The format for UTCTimeOnly
is HH:MM:SS[.sss].
Declaration
public static byte[] formatUTCTimeOnly(DateTime calendar, TimestampPrecision precision)
Parameters
Type | Name | Description |
---|---|---|
System.DateTime | calendar | the value |
TimestampPrecision | precision |
Returns
Type | Description |
---|---|
System.Byte[] |
FormatUtcTimestamp(DateTime, TimestampPrecision)
Formats the value of calendar
to the UTCTimestamp
format.
The format for UTCTimestamp
is YYYYMMDD-HH:MM:SS[.sss].
Declaration
public static byte[] FormatUtcTimestamp(DateTime calendar, TimestampPrecision precision)
Parameters
Type | Name | Description |
---|---|---|
System.DateTime | calendar | the value |
TimestampPrecision | precision |
Returns
Type | Description |
---|---|
System.Byte[] |
FormatUtcTimestamp40(DateTime)
Formats the value of calendar
to the UTCTimestamp40
format.
The format for UTCTimestamp40
is YYYYMMDD-HH:MM:SS.
Declaration
public static byte[] FormatUtcTimestamp40(DateTime calendar)
Parameters
Type | Name | Description |
---|---|---|
System.DateTime | calendar | the value |
Returns
Type | Description |
---|---|
System.Byte[] |
FormatUtcTimestampWithMs(DateTime, Byte[])
Format UTC timestamp with include milliseconds
Declaration
public static void FormatUtcTimestampWithMs(DateTime calendar, byte[] sendingTimeBufMs)
Parameters
Type | Name | Description |
---|---|---|
System.DateTime | calendar | timestamp |
System.Byte[] | sendingTimeBufMs | buffer size must be 21 |
FormatUtcTimestampWithoutMs(DateTime, Byte[])
Format UTC timestamp with include milliseconds
Declaration
public static void FormatUtcTimestampWithoutMs(DateTime calendar, byte[] sendingTimeBufNoMs)
Parameters
Type | Name | Description |
---|---|---|
System.DateTime | calendar | timestamp |
System.Byte[] | sendingTimeBufNoMs | buffer size must be 17 |
GetSeqNumLength(Int64, Int32)
Calculates length of the SeqNum field for provided value and minimal length.
Declaration
public static int GetSeqNumLength(long value, int minLen)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | value | Value to calculate length. |
System.Int32 | minLen | Minimal length of the field, optional. |
Returns
Type | Description |
---|---|
System.Int32 | Returns length (number of bytes) required to store provided value considering minimal length. |
IsInvalidBoolean(TagValue)
Returns true, if tag
contains the invalid boolean
value.
Declaration
public static bool IsInvalidBoolean(TagValue tag)
Parameters
Type | Name | Description |
---|---|---|
TagValue | tag | TagValue tag. |
Returns
Type | Description |
---|---|
System.Boolean |
IsInvalidBoolean(Byte[])
Returns true, if buffer
contains the invalid boolean
value.
Declaration
public static bool IsInvalidBoolean(byte[] buffer)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buffer | the buffer of bytes |
Returns
Type | Description |
---|---|
System.Boolean |
IsInvalidBoolean(Byte[], Int32, Int32)
Returns true, if subarray contains the invalid boolean
value.
The offset
argument is the
index of the first byte of the subarray and the count
argument specifies the length of the subarray.
Declaration
public static bool IsInvalidBoolean(byte[] buffer, int offset, int count)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buffer | the buffer of bytes |
System.Int32 | offset | the initial offset |
System.Int32 | count | the length |
Returns
Type | Description |
---|---|
System.Boolean |
IsInvalidDate(TagValue)
Returns true, if subarray contains the invalid Date
value.
The format for Date
is yyyymmdd.
Declaration
public static bool IsInvalidDate(TagValue tag)
Parameters
Type | Name | Description |
---|---|---|
TagValue | tag | the buffer of bytes |
Returns
Type | Description |
---|---|
System.Boolean |
IsInvalidDate(Byte[])
Returns true, if subarray contains the invalid Date
value.
The format for Date
is yyyymmdd.
Declaration
public static bool IsInvalidDate(byte[] buffer)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buffer | the buffer of bytes |
Returns
Type | Description |
---|---|
System.Boolean |
IsInvalidDate(Byte[], Int32, Int32)
Returns true, if subarray contains the invalid Date
value.
The offset
argument is the
index of the first byte of the subarray and the count
argument specifies the length of the subarray.
The format for Date
is yyyymmdd.
Declaration
public static bool IsInvalidDate(byte[] buffer, int offset, int count)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buffer | the buffer of bytes |
System.Int32 | offset | the initial offset |
System.Int32 | count | the length |
Returns
Type | Description |
---|---|
System.Boolean |
IsInvalidFloat(TagValue)
Returns false, if tag
contains the invalid float value.
Declaration
public static bool IsInvalidFloat(TagValue tag)
Parameters
Type | Name | Description |
---|---|---|
TagValue | tag | TagValue tag. |
Returns
Type | Description |
---|---|
System.Boolean |
IsInvalidFloat(Byte[])
Returns false, if buffer
contains the invalid float value.
Declaration
public static bool IsInvalidFloat(byte[] buffer)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buffer | the buffer of bytes |
Returns
Type | Description |
---|---|
System.Boolean |
IsInvalidFloat(Byte[], Int32, Int32)
Returns true, if subarray contains the invalid float value.
The offset
argument is the
index of the first byte of the subarray and the count
argument specifies the length of the subarray.
Declaration
public static bool IsInvalidFloat(byte[] buffer, int offset, int count)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buffer | the buffer of bytes |
System.Int32 | offset | the initial offset |
System.Int32 | count | the length |
Returns
Type | Description |
---|---|
System.Boolean |
IsInvalidInt(TagValue)
Returns true, if TagValue contains the invalid integer
value.
Declaration
public static bool IsInvalidInt(TagValue tag)
Parameters
Type | Name | Description |
---|---|---|
TagValue | tag |
Returns
Type | Description |
---|---|
System.Boolean |
IsInvalidInt(Byte[])
Returns true, if subarray contains the invalid integer
value.
Declaration
public static bool IsInvalidInt(byte[] buffer)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buffer | the buffer of bytes |
Returns
Type | Description |
---|---|
System.Boolean |
IsInvalidInt(Byte[], Int32, Int32)
Check if buffer has invalid integer number
Declaration
public static bool IsInvalidInt(byte[] buf, int off, int len)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buf | buffer |
System.Int32 | off | buffer offset |
System.Int32 | len | buffer length |
Returns
Type | Description |
---|---|
System.Boolean | true if invalid |
IsInvalidMonthYear(TagValue)
Returns true, if tag
contains the invalid MonthYear
value.
Declaration
public static bool IsInvalidMonthYear(TagValue tag)
Parameters
Type | Name | Description |
---|---|---|
TagValue | tag | TagValue tag. |
Returns
Type | Description |
---|---|
System.Boolean |
IsInvalidMonthYear(Byte[])
Returns true, if subarray contains the invalid MonthYear
value.
The format for MonthYear
is YYYYMM.
Declaration
public static bool IsInvalidMonthYear(byte[] buffer)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buffer | the buffer of bytes |
Returns
Type | Description |
---|---|
System.Boolean |
IsInvalidMonthYear(Byte[], Int32, Int32)
Returns true, if subarray contains the invalid MonthYear
value.
The offset
argument is the
index of the first byte of the subarray and the count
argument specifies the length of the subarray.
The format for MonthYear
is YYYYMM.
Declaration
public static bool IsInvalidMonthYear(byte[] buffer, int offset, int count)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buffer | the buffer of bytes |
System.Int32 | offset | the initial offset |
System.Int32 | count | the length |
Returns
Type | Description |
---|---|
System.Boolean |
IsInvalidMonthYear44(TagValue)
Returns true, if TagValue contains the invalid MonthYear44
value.
Declaration
public static bool IsInvalidMonthYear44(TagValue tag)
Parameters
Type | Name | Description |
---|---|---|
TagValue | tag |
Returns
Type | Description |
---|---|
System.Boolean |
IsInvalidMonthYear44(Byte[])
Returns true, if subarray contains the invalid MonthYear44
value.
The format for MonthYear
are YYYYMM,YYYYMMDD and YYYYMMWW.
Declaration
public static bool IsInvalidMonthYear44(byte[] buffer)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buffer | the buffer of bytes |
Returns
Type | Description |
---|---|
System.Boolean |
IsInvalidMonthYear44(Byte[], Int32, Int32)
Returns true, if subarray contains the invalid MonthYear44
value.
The offset
argument is the
index of the first byte of the subarray and the count
argument specifies the length of the subarray.
The format for MonthYear
are YYYYMM,YYYYMMDD and YYYYMMWW.
Declaration
public static bool IsInvalidMonthYear44(byte[] buffer, int offset, int count)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buffer | the buffer of bytes |
System.Int32 | offset | the initial offset |
System.Int32 | count | the length |
Returns
Type | Description |
---|---|
System.Boolean |
IsInvalidTime(TagValue)
Returns true, if subarray contains the invalid Time
value.
The format for Time
is YYYYMMDD-HH:MM:SS.
Declaration
public static bool IsInvalidTime(TagValue tag)
Parameters
Type | Name | Description |
---|---|---|
TagValue | tag | the buffer of bytes |
Returns
Type | Description |
---|---|
System.Boolean |
IsInvalidTime(Byte[])
Returns true, if subarray contains the invalid Time
value.
The format for Time
is YYYYMMDD-HH:MM:SS.
Declaration
public static bool IsInvalidTime(byte[] buffer)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buffer | the buffer of bytes |
Returns
Type | Description |
---|---|
System.Boolean |
IsInvalidTime(Byte[], Int32, Int32)
Returns true, if subarray contains the invalid Time
value.
The offset
argument is the
index of the first byte of the subarray and the count
argument specifies the length of the subarray.
The format for Time
is YYYYMMDD-HH:MM:SS.
Declaration
public static bool IsInvalidTime(byte[] buffer, int offset, int count)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buffer | the buffer of bytes |
System.Int32 | offset | the initial offset |
System.Int32 | count | the length |
Returns
Type | Description |
---|---|
System.Boolean |
isInvalidTimeOnly(TagValue)
Returns true, if tag
contains the invalid TimeOnly
value.
The format for TimeOnly
is HH:MM:SS[.sss][sss][sss]
Declaration
public static bool isInvalidTimeOnly(TagValue tag)
Parameters
Type | Name | Description |
---|---|---|
TagValue | tag | the buffer of bytes |
Returns
Type | Description |
---|---|
System.Boolean |
isInvalidTimeOnly(Byte[])
Returns true, if buffer
contains the invalid TimeOnly
value.
The format for TimeOnly
is HH:MM:SS[.sss][sss][sss]
Declaration
public static bool isInvalidTimeOnly(byte[] buffer)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buffer | the buffer of bytes |
Returns
Type | Description |
---|---|
System.Boolean |
isInvalidTimeOnly(Byte[], Int32, Int32)
Returns true, if subarray contains the invalid TimeOnly
value.
The offset
argument is the
index of the first byte of the subarray and the count
argument specifies the length of the subarray.
The format for TimeOnly
is HH:MM:SS[.sss]
Declaration
public static bool isInvalidTimeOnly(byte[] buffer, int offset, int count)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buffer | the buffer of bytes |
System.Int32 | offset | the initial offset |
System.Int32 | count | the length |
Returns
Type | Description |
---|---|
System.Boolean |
IsInvalidTimestamp(TagValue)
Declaration
public static bool IsInvalidTimestamp(TagValue tag)
Parameters
Type | Name | Description |
---|---|---|
TagValue | tag |
Returns
Type | Description |
---|---|
System.Boolean |
IsInvalidTimestamp(Byte[])
Declaration
public static bool IsInvalidTimestamp(byte[] buffer)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buffer |
Returns
Type | Description |
---|---|
System.Boolean |
IsInvalidTimestamp(Byte[], Int32, Int32)
Returns true, if subarray contains the invalid Timestamp
value.
The offset
argument is the
index of the first byte of the subarray and the count
argument specifies the length of the subarray.
Declaration
public static bool IsInvalidTimestamp(byte[] buffer, int offset, int count)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buffer | the buffer of bytes |
System.Int32 | offset | the initial offset |
System.Int32 | count | the length |
Returns
Type | Description |
---|---|
System.Boolean |
IsInvalidTimestamp40(TagValue)
Declaration
public static bool IsInvalidTimestamp40(TagValue tag)
Parameters
Type | Name | Description |
---|---|---|
TagValue | tag |
Returns
Type | Description |
---|---|
System.Boolean |
IsInvalidTimestamp40(Byte[], Int32, Int32)
Declaration
public static bool IsInvalidTimestamp40(byte[] buf, int off, int len)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buf | |
System.Int32 | off | |
System.Int32 | len |
Returns
Type | Description |
---|---|
System.Boolean |
isInvalidTZTimeOnly(TagValue)
Returns true, if subarray contains the invalid TZTimeOnly
value.
The format for TZTimeOnly
is HH:MM[:SS][.sss][Z | [ + | - hh[:mm]]].
Declaration
public static bool isInvalidTZTimeOnly(TagValue tag)
Parameters
Type | Name | Description |
---|---|---|
TagValue | tag | the buffer of bytes |
Returns
Type | Description |
---|---|
System.Boolean |
isInvalidTZTimeOnly(Byte[])
Returns true, if subarray contains the invalid TZTimeOnly
value.
The format for TZTimeOnly
is HH:MM[:SS][.sss][Z | [ + | - hh[:mm]]].
Declaration
public static bool isInvalidTZTimeOnly(byte[] buffer)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buffer | the buffer of bytes |
Returns
Type | Description |
---|---|
System.Boolean |
isInvalidTZTimeOnly(Byte[], Int32, Int32)
Returns true, if subarray contains the invalid TZTimeOnly
value.
The offset
argument is the
index of the first byte of the subarray and the count
argument specifies the length of the subarray.
The format for TZTimeOnly
is HH:MM[:SS][.sss][sss][sss][Z | [ + | - hh[:mm]]].
Declaration
public static bool isInvalidTZTimeOnly(byte[] buffer, int offset, int count)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buffer | the buffer of bytes |
System.Int32 | offset | the initial offset |
System.Int32 | count | the length |
Returns
Type | Description |
---|---|
System.Boolean |
IsInvalidTzTimestamp(TagValue)
Returns true, if TagValue contains the invalid TZTimestamp
value.
Declaration
public static bool IsInvalidTzTimestamp(TagValue tag)
Parameters
Type | Name | Description |
---|---|---|
TagValue | tag | TagValue tag. |
Returns
Type | Description |
---|---|
System.Boolean |
IsInvalidTzTimestamp(Byte[])
Returns true, if subarray contains the invalid TZTimestamp
value.
Declaration
public static bool IsInvalidTzTimestamp(byte[] buffer)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buffer | the buffer of bytes |
Returns
Type | Description |
---|---|
System.Boolean |
IsInvalidTzTimestamp(Byte[], Int32, Int32)
Returns true, if subarray contains the invalid TZTimestamp
value.
The offset
argument is the
index of the first byte of the subarray and the count
argument specifies the length of the subarray.
The format for TZTimestamp
is YYYYMMDD-HH:MM[:SS[.sss][sss][sss]][Z | [ + | - hh[:mm]]].
Declaration
public static bool IsInvalidTzTimestamp(byte[] buffer, int offset, int count)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buffer | the buffer of bytes |
System.Int32 | offset | the initial offset |
System.Int32 | count | the length |
Returns
Type | Description |
---|---|
System.Boolean |
ParseBoolean(Byte[])
Parses the boolean
value from bytes.
Declaration
public static bool ParseBoolean(byte[] buffer)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buffer | the buffer of bytes |
Returns
Type | Description |
---|---|
System.Boolean |
Exceptions
Type | Condition |
---|---|
System.ArgumentException |
ParseBoolean(Byte[], Int32, Int32)
Parses the boolean
value from subarray.
The offset
argument is the
index of the first byte of the subarray and the count
argument specifies the length of the subarray.
Declaration
public static bool ParseBoolean(byte[] buffer, int offset, int count)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buffer | the buffer of bytes |
System.Int32 | offset | the initial offset |
System.Int32 | count | the length |
Returns
Type | Description |
---|---|
System.Boolean |
Exceptions
Type | Condition |
---|---|
System.ArgumentException |
ParseDate(Byte[])
Parses the Date
value from buffer
.
Declaration
public static DateTime ParseDate(byte[] buffer)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buffer | the buffer of bytes |
Returns
Type | Description |
---|---|
System.DateTime |
Exceptions
Type | Condition |
---|---|
System.ArgumentException |
ParseDate(Byte[], Int32, Int32)
Parses the Date
value from buffer
.
Declaration
public static DateTime ParseDate(byte[] buffer, int offset, int length)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buffer | the buffer of bytes |
System.Int32 | offset | |
System.Int32 | length |
Returns
Type | Description |
---|---|
System.DateTime |
Exceptions
Type | Condition |
---|---|
System.ArgumentException |
ParseDatePart(Byte[], Int32, Int32)
Declaration
protected static int ParseDatePart(byte[] buffer, int year, int month)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buffer | |
System.Int32 | year | |
System.Int32 | month |
Returns
Type | Description |
---|---|
System.Int32 |
ParseDatePart(Byte[], Int32, Int32, Int32)
Declaration
protected static int ParseDatePart(byte[] buffer, int offset, int year, int month)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buffer | |
System.Int32 | offset | |
System.Int32 | year | |
System.Int32 | month |
Returns
Type | Description |
---|---|
System.Int32 |
ParseFloat(TagValue)
Parses the float value from TagValue.
Declaration
public static double ParseFloat(TagValue tag)
Parameters
Type | Name | Description |
---|---|---|
TagValue | tag |
Returns
Type | Description |
---|---|
System.Double |
Exceptions
Type | Condition |
---|---|
System.ArgumentException |
ParseFloat(Byte[])
Parses the float value from bytes.
Declaration
public static double ParseFloat(byte[] value)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | value | the buffer of bytes |
Returns
Type | Description |
---|---|
System.Double |
Exceptions
Type | Condition |
---|---|
System.ArgumentException |
ParseFloat(Byte[], Int32, Int32)
Garbage-free method for converting string to double
Declaration
public static double ParseFloat(byte[] buffer, int offset, int count)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buffer | |
System.Int32 | offset | |
System.Int32 | count |
Returns
Type | Description |
---|---|
System.Double |
ParseInt(TagValue)
Parses the integer
value from tag
.
Declaration
public static long ParseInt(TagValue tag)
Parameters
Type | Name | Description |
---|---|---|
TagValue | tag |
Returns
Type | Description |
---|---|
System.Int64 |
ParseInt(Byte[])
Parses the integer
value from buffer
.
Declaration
public static long ParseInt(byte[] buffer)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buffer | the buffer of bytes |
Returns
Type | Description |
---|---|
System.Int64 |
Exceptions
Type | Condition |
---|---|
System.ArgumentException |
ParseInt(Byte[], Int32, Int32)
Parses the integer
value from buffer
.
The offset
argument is the
index of the first byte of the subarray and the count
argument specifies the length of the subarray.
Declaration
public static long ParseInt(byte[] buffer, int offset, int count)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buffer | the buffer of bytes |
System.Int32 | offset | the initial offset |
System.Int32 | count | the length |
Returns
Type | Description |
---|---|
System.Int64 |
Exceptions
Type | Condition |
---|---|
System.ArgumentException |
ParseInt(String, Int32, Int32)
Parses the integer
value from str
.
The offset
argument is the
index of the first char of the substring and the count
argument specifies the length of the substring.
Declaration
public static long ParseInt(string str, int offset, int count)
Parameters
Type | Name | Description |
---|---|---|
System.String | str | a string representation of an integer. |
System.Int32 | offset | the initial offset |
System.Int32 | count | the length |
Returns
Type | Description |
---|---|
System.Int64 |
Exceptions
Type | Condition |
---|---|
System.ArgumentException |
ParseLocalMktDate(Byte[])
Parses the LocalMktDate
value from buffer
.
Declaration
public static DateTime ParseLocalMktDate(byte[] buffer)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buffer | the buffer of bytes |
Returns
Type | Description |
---|---|
System.DateTime |
Exceptions
Type | Condition |
---|---|
System.ArgumentException |
ParseMonthPart(Byte[])
Declaration
protected static int ParseMonthPart(byte[] block)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | block |
Returns
Type | Description |
---|---|
System.Int32 |
ParseMonthPart(Byte[], Int32)
Declaration
protected static int ParseMonthPart(byte[] block, int offset)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | block | |
System.Int32 | offset |
Returns
Type | Description |
---|---|
System.Int32 |
ParseMonthYear(Byte[])
Parses the MonthYear
value from buffer
.
Declaration
public static DateTime ParseMonthYear(byte[] buffer)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buffer | the buffer of bytes |
Returns
Type | Description |
---|---|
System.DateTime |
Exceptions
Type | Condition |
---|---|
System.ArgumentException |
ParseMonthYear(Byte[], Int32, Int32)
Parses the MonthYear
value from buffer
.
Declaration
public static DateTime ParseMonthYear(byte[] buffer, int offset, int length)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buffer | the buffer of bytes |
System.Int32 | offset | |
System.Int32 | length |
Returns
Type | Description |
---|---|
System.DateTime |
Exceptions
Type | Condition |
---|---|
System.ArgumentException |
ParseMonthYear44(Byte[])
Parses the MonthYear44
value from buffer
.
The format for MonthYear44
are YYYYMM, YYYYMMDD and YYYYMMWW.
Declaration
public static DateTime ParseMonthYear44(byte[] buffer)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buffer | the buffer of bytes |
Returns
Type | Description |
---|---|
System.DateTime |
Exceptions
Type | Condition |
---|---|
System.ArgumentException |
ParseMonthYear44(Byte[], Int32, Int32)
Parses the MonthYear44
value from buffer
.
The format for MonthYear44
are YYYYMM, YYYYMMDD and YYYYMMWW.
Declaration
public static DateTime ParseMonthYear44(byte[] buffer, int offset, int length)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buffer | the buffer of bytes |
System.Int32 | offset | |
System.Int32 | length |
Returns
Type | Description |
---|---|
System.DateTime |
Exceptions
Type | Condition |
---|---|
System.ArgumentException |
ParseNumberPart(Byte[], Int32, Int32)
Declaration
protected static int ParseNumberPart(byte[] block, int off, int limit)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | block | |
System.Int32 | off | |
System.Int32 | limit |
Returns
Type | Description |
---|---|
System.Int32 |
ParseShortTime(Byte[])
Parses the Time
value from buffer
.
Declaration
public static DateTime ParseShortTime(byte[] buffer)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buffer | the buffer of bytes |
Returns
Type | Description |
---|---|
System.DateTime |
Exceptions
Type | Condition |
---|---|
System.ArgumentException |
ParseTime(Byte[])
Parses the Time
value from buffer
.
Declaration
public static DateTime ParseTime(byte[] buffer)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buffer | the buffer of bytes |
Returns
Type | Description |
---|---|
System.DateTime |
Exceptions
Type | Condition |
---|---|
System.ArgumentException |
parseTimeOnly(Byte[])
Parses the TimeOnly
value from buffer
.
Declaration
public static DateTime parseTimeOnly(byte[] buffer)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buffer | the buffer of bytes |
Returns
Type | Description |
---|---|
System.DateTime |
Exceptions
Type | Condition |
---|---|
System.ArgumentException |
parseTimeOnly(Byte[], Int32, Int32)
Parses the TimeOnly
value from buffer
.
Declaration
public static DateTime parseTimeOnly(byte[] buffer, int offset, int length)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buffer | the buffer of bytes |
System.Int32 | offset | |
System.Int32 | length |
Returns
Type | Description |
---|---|
System.DateTime |
Exceptions
Type | Condition |
---|---|
System.ArgumentException |
ParseTimestamp(Byte[])
Parses the Timestamp
value from buffer
to calendar
.
The format for Timestamp
is YYYYMMDD-HH:MM:SS[.sss]
Declaration
public static DateTime ParseTimestamp(byte[] buffer)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buffer | the buffer of bytes |
Returns
Type | Description |
---|---|
System.DateTime |
Exceptions
Type | Condition |
---|---|
System.ArgumentException |
ParseTimestamp(Byte[], Int32, Int32)
Parses the Timestamp
value from buffer
to calendar
.
The format for Timestamp
is YYYYMMDD-HH:MM:SS[.sss]
Declaration
public static DateTime ParseTimestamp(byte[] buffer, int offset, int length)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buffer | the buffer of bytes |
System.Int32 | offset | |
System.Int32 | length |
Returns
Type | Description |
---|---|
System.DateTime |
Exceptions
Type | Condition |
---|---|
System.ArgumentException |
ParseTimestamp40(Byte[])
Parses the Timestamp40
value from buffer
.
The format for Timestamp40
is YYYYMMDD-HH:MM:SS
Declaration
public static DateTime ParseTimestamp40(byte[] buffer)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buffer | the buffer of bytes |
Returns
Type | Description |
---|---|
System.DateTime |
Exceptions
Type | Condition |
---|---|
System.ArgumentException |
parseTZTimeOnly(Byte[])
Parses the TZTimeOnly
value from buffer
.
Declaration
public static DateTimeOffset parseTZTimeOnly(byte[] buffer)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buffer | the buffer of bytes |
Returns
Type | Description |
---|---|
System.DateTimeOffset |
Exceptions
Type | Condition |
---|---|
System.ArgumentException |
parseTZTimeOnly(Byte[], Int32, Int32)
Declaration
public static DateTimeOffset parseTZTimeOnly(byte[] buffer, int offset, int length)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buffer | |
System.Int32 | offset | |
System.Int32 | length |
Returns
Type | Description |
---|---|
System.DateTimeOffset |
ParseTzTimestamp(Byte[])
Parses the TZTimestamp
value from buffer
.
Declaration
public static DateTimeOffset ParseTzTimestamp(byte[] buffer)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buffer | the buffer of bytes |
Returns
Type | Description |
---|---|
System.DateTimeOffset |
Exceptions
Type | Condition |
---|---|
System.ArgumentException |
ParseTzTimestamp(Byte[], Int32, Int32)
Parses the TZTimestamp
value from buffer
.
Declaration
public static DateTimeOffset ParseTzTimestamp(byte[] buffer, int offset, int length)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buffer | the buffer of bytes |
System.Int32 | offset | |
System.Int32 | length |
Returns
Type | Description |
---|---|
System.DateTimeOffset |
Exceptions
Type | Condition |
---|---|
System.ArgumentException |
ParseYearPart(Byte[])
Declaration
protected static int ParseYearPart(byte[] block)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | block |
Returns
Type | Description |
---|---|
System.Int32 |
ParseYearPart(Byte[], Int32)
Declaration
protected static int ParseYearPart(byte[] block, int offset)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | block | |
System.Int32 | offset |
Returns
Type | Description |
---|---|
System.Int32 |
TryParseLong(Byte[], Int32, Int32, out Int64)
Try to parse the long
value from buffer
.
The offset
argument is the
index of the first byte of the subarray and the count
argument specifies the length of the subarray.
Declaration
public static bool TryParseLong(byte[] buffer, int offset, int count, out long value)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | buffer | the buffer of bytes |
System.Int32 | offset | the initial offset |
System.Int32 | count | the length |
System.Int64 | value | parsed value if parsing succeeded or 0L |
Returns
Type | Description |
---|---|
System.Boolean | True, if parsing was sucessful. |