RTI Connext .NET API (legacy)
Version 6.1.2
|
A collection of data samples and sample info. More...
#include <managed_subscription.h>
Inherits IEnumerable< LoanedSample< T > >, and IDisposable.
Properties | |
System::Int32 | Count [get] |
Returns the number of samples. More... | |
LoanedSample< T > | default [int] [get] |
Returns a sample by index. More... | |
A collection of data samples and sample info.
LoanedSamples is a loaned collection returned by TypedDataReader::take(), TypedDataReader::read() or TypedDataReader::select(). Each element is a LoanedSample, containing the properties data and info.
This collection implements IDisposable
to manage the loan. To return the loan call Dispose()
or use a using
statement.
This collection also implements IEnumerable
. This allows using a LoanedSamples collection in a foreach
statement, or in a Linq query.
Examples:
(The following examples assume a reader for the following IDL type)
This example prints myValue
for all the samples with valid data:
This example obtains a list containing the values of the field myValue
for those samples with valid data such that myName
=
"Foo"
:
|
get |
Returns the number of samples.
|
get |
Returns a sample by index.