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
valueTArray[]The array which will contain the copy of the message payload.
Type Parameters
TArrayThe type of the non-pointer values in the array.
Exceptions
- ArgumentNullException
valueisnull.- ArgumentException
The number of bytes in
valueis 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
valueTArray[]The array which will contain the copy of the message payload.
timestampdoubleThe timestamp of the message payload, in seconds.
Type Parameters
TArrayThe type of the non-pointer values in the array.
Exceptions
- ArgumentNullException
valueisnull.- ArgumentException
The number of bytes in
valueis 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
valueTArray[]The array which will contain the copy of the message payload.
indexintThe zero-based offset into
value.
Type Parameters
TArrayThe type of the non-pointer values in the array.
Exceptions
- ArgumentNullException
valueisnull.- ArgumentException
The number of bytes in
valueis less thanindextimes 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
valueTArray[]The array which will contain the copy of the message payload.
indexintThe zero-based offset into
value.timestampdoubleThe timestamp of the message payload, in seconds.
Type Parameters
TArrayThe type of the non-pointer values in the array.
Exceptions
- ArgumentNullException
valueisnull.- ArgumentException
The number of bytes in
valueis less thanindextimes size of each array element plus the total size of the payload.- InvalidOperationException
The message does not have a timestamped payload.