Method CopyTo
CopyTo<TArray>(TArray[])
Copies the message payload into an array of non-pointer value types. The size in bytes of the array should be equal to or higher than the total size of the payload.
public void CopyTo<TArray>(TArray[] value) where TArray : unmanaged
Parameters
value
TArray[]The array which will contain the copy of the message payload.
Type Parameters
TArray
The type of the non-pointer values in the array.
Exceptions
- ArgumentNullException
value
isnull
.- ArgumentException
The number of bytes in
value
is less than the total size of the payload.
CopyTo<TArray>(TArray[], out double)
Copies the message payload into an array of non-pointer value types and gets the message timestamp. The size in bytes of the array should be equal to or higher than the total size of the payload.
public void CopyTo<TArray>(TArray[] value, out double timestamp) where TArray : unmanaged
Parameters
value
TArray[]The array which will contain the copy of the message payload.
timestamp
doubleThe timestamp of the message payload, in seconds.
Type Parameters
TArray
The type of the non-pointer values in the array.
Exceptions
- ArgumentNullException
value
isnull
.- ArgumentException
The number of bytes in
value
is less than the total size of the payload.- InvalidOperationException
The message does not have a timestamped payload.
CopyTo<TArray>(TArray[], int)
Copies the message payload into an array of non-pointer value types, starting at the specified index. The size in bytes of the array should be equal to or higher than the total size of the payload.
public void CopyTo<TArray>(TArray[] value, int index) where TArray : unmanaged
Parameters
value
TArray[]The array which will contain the copy of the message payload.
index
intThe zero-based offset into
value
.
Type Parameters
TArray
The type of the non-pointer values in the array.
Exceptions
- ArgumentNullException
value
isnull
.- ArgumentException
The number of bytes in
value
is less thanindex
times size of each array element plus the total size of the payload.
CopyTo<TArray>(TArray[], int, out double)
Copies the message payload into an array of non-pointer value types, starting at the specified index, and gets the message timestamp. The size in bytes of the array should be equal to or higher than the total size of the payload.
public void CopyTo<TArray>(TArray[] value, int index, out double timestamp) where TArray : unmanaged
Parameters
value
TArray[]The array which will contain the copy of the message payload.
index
intThe zero-based offset into
value
.timestamp
doubleThe timestamp of the message payload, in seconds.
Type Parameters
TArray
The type of the non-pointer values in the array.
Exceptions
- ArgumentNullException
value
isnull
.- ArgumentException
The number of bytes in
value
is less thanindex
times size of each array element plus the total size of the payload.- InvalidOperationException
The message does not have a timestamped payload.