Class Available
Collection of greedy interpolators that act on immediately available data.
Namespace: Microsoft.Psi
Assembly: Microsoft.Psi.dll
Syntax
public static class Available : object
Remarks
The interpolators defined by the Available class produce results based on what is available on the secondary stream at the moment the primary message arrives. As such, they depend on the wall-clock time of message arrival, and hence are not guaranteed to produce reproducible results. For reproducible interpolators, see the interpolators defined by the Reproducible static class.
Methods
View SourceExact<T>()
Greedy interpolator that selects the available value with an originating time exactly matching the interpolation time.
Declaration
public static GreedyInterpolator<T> Exact<T>()
Returns
Type | Description |
---|---|
GreedyInterpolator<T> | The greedy interpolator. |
Type Parameters
Name | Description |
---|---|
T | The message type. |
ExactOrDefault<T>(T)
Greedy interpolator that selects the available value with an originating time exactly matching the interpolation time, or default if no such value is found.
Declaration
public static GreedyInterpolator<T> ExactOrDefault<T>(T defaultValue = null)
Parameters
Type | Name | Description |
---|---|---|
T | defaultValue | An optional default value to use. |
Returns
Type | Description |
---|---|
GreedyInterpolator<T> | The greedy interpolator. |
Type Parameters
Name | Description |
---|---|
T | The message type. |
First<T>()
Greedy interpolator that selects the first available value in the stream.
Declaration
public static GreedyInterpolator<T> First<T>()
Returns
Type | Description |
---|---|
GreedyInterpolator<T> | The greedy interpolator. |
Type Parameters
Name | Description |
---|---|
T | The message type. |
First<T>(RelativeTimeInterval)
Greedy interpolator that selects the first available value within a specified RelativeTimeInterval.
Declaration
public static GreedyInterpolator<T> First<T>(RelativeTimeInterval relativeTimeInterval)
Parameters
Type | Name | Description |
---|---|---|
RelativeTimeInterval | relativeTimeInterval | The relative time interval within which to search for the first message. |
Returns
Type | Description |
---|---|
GreedyInterpolator<T> | The greedy interpolator. |
Type Parameters
Name | Description |
---|---|
T | The message type. |
First<T>(TimeSpan)
Greedy interpolator that selects the first available value within a specified time tolerance.
Declaration
public static GreedyInterpolator<T> First<T>(TimeSpan tolerance)
Parameters
Type | Name | Description |
---|---|---|
TimeSpan | tolerance | The tolerance within which to search for the first message. |
Returns
Type | Description |
---|---|
GreedyInterpolator<T> | The greedy interpolator. |
Type Parameters
Name | Description |
---|---|
T | The message type. |
FirstOrDefault<T>(T)
Greedy interpolator that selects the first available value in the stream, or default if no such value is found.
Declaration
public static GreedyInterpolator<T> FirstOrDefault<T>(T defaultValue = null)
Parameters
Type | Name | Description |
---|---|---|
T | defaultValue | An optional default value to use. |
Returns
Type | Description |
---|---|
GreedyInterpolator<T> | The greedy interpolator. |
Type Parameters
Name | Description |
---|---|
T | The message type. |
FirstOrDefault<T>(RelativeTimeInterval, T)
Greedy interpolator that selects the first available value within a specified RelativeTimeInterval, or default if no such value is found.
Declaration
public static GreedyInterpolator<T> FirstOrDefault<T>(RelativeTimeInterval relativeTimeInterval, T defaultValue = null)
Parameters
Type | Name | Description |
---|---|---|
RelativeTimeInterval | relativeTimeInterval | The relative time interval within which to search for the first message. |
T | defaultValue | An optional default value to use. |
Returns
Type | Description |
---|---|
GreedyInterpolator<T> | The greedy interpolator. |
Type Parameters
Name | Description |
---|---|
T | The message type. |
FirstOrDefault<T>(TimeSpan, T)
Greedy interpolator that selects the first available value within a specified time tolerance, or default if no such value is found.
Declaration
public static GreedyInterpolator<T> FirstOrDefault<T>(TimeSpan tolerance, T defaultValue = null)
Parameters
Type | Name | Description |
---|---|---|
TimeSpan | tolerance | The tolerance within which to search for the first message. |
T | defaultValue | An optional default value to use. |
Returns
Type | Description |
---|---|
GreedyInterpolator<T> | The greedy interpolator. |
Type Parameters
Name | Description |
---|---|
T | The message type. |
Last<T>()
Greedy interpolator that selects the last available value in the stream.
Declaration
public static GreedyInterpolator<T> Last<T>()
Returns
Type | Description |
---|---|
GreedyInterpolator<T> | The greedy interpolator. |
Type Parameters
Name | Description |
---|---|
T | The message type. |
Last<T>(RelativeTimeInterval)
Greedy interpolator that selects the last available value within a specified RelativeTimeInterval.
Declaration
public static GreedyInterpolator<T> Last<T>(RelativeTimeInterval relativeTimeInterval)
Parameters
Type | Name | Description |
---|---|---|
RelativeTimeInterval | relativeTimeInterval | The relative time interval within which to search for the last message. |
Returns
Type | Description |
---|---|
GreedyInterpolator<T> | The greedy interpolator. |
Type Parameters
Name | Description |
---|---|
T | The message type. |
Last<T>(TimeSpan)
Greedy interpolator that selects the first available value within a specified time tolerance.
Declaration
public static GreedyInterpolator<T> Last<T>(TimeSpan tolerance)
Parameters
Type | Name | Description |
---|---|---|
TimeSpan | tolerance | The tolerance within which to search for the last message. |
Returns
Type | Description |
---|---|
GreedyInterpolator<T> | The greedy interpolator. |
Type Parameters
Name | Description |
---|---|
T | The message type. |
LastOrDefault<T>(T)
Greedy interpolator that selects the last available value in the stream, or default if no such value is found.
Declaration
public static GreedyInterpolator<T> LastOrDefault<T>(T defaultValue = null)
Parameters
Type | Name | Description |
---|---|---|
T | defaultValue | An optional default value to use. |
Returns
Type | Description |
---|---|
GreedyInterpolator<T> | The greedy interpolator. |
Type Parameters
Name | Description |
---|---|
T | The message type. |
LastOrDefault<T>(RelativeTimeInterval, T)
Greedy interpolator that selects the last available value within a specified RelativeTimeInterval, or default if no such value is found.
Declaration
public static GreedyInterpolator<T> LastOrDefault<T>(RelativeTimeInterval relativeTimeInterval, T defaultValue = null)
Parameters
Type | Name | Description |
---|---|---|
RelativeTimeInterval | relativeTimeInterval | The relative time interval within which to search for the last message. |
T | defaultValue | An optional default value to use. |
Returns
Type | Description |
---|---|
GreedyInterpolator<T> | The greedy interpolator. |
Type Parameters
Name | Description |
---|---|
T | The message type. |
LastOrDefault<T>(TimeSpan, T)
Greedy interpolator that selects the first available value within a specified time tolerance, or default if no such value is found.
Declaration
public static GreedyInterpolator<T> LastOrDefault<T>(TimeSpan tolerance, T defaultValue = null)
Parameters
Type | Name | Description |
---|---|---|
TimeSpan | tolerance | The tolerance within which to search for the last message. |
T | defaultValue | An optional default value to use. |
Returns
Type | Description |
---|---|
GreedyInterpolator<T> | The greedy interpolator. |
Type Parameters
Name | Description |
---|---|
T | The message type. |
Nearest<T>()
Greedy interpolator that selects the available value with an originating time nearest to the interpolation time.
Declaration
public static GreedyInterpolator<T> Nearest<T>()
Returns
Type | Description |
---|---|
GreedyInterpolator<T> | The greedy interpolator. |
Type Parameters
Name | Description |
---|---|
T | The message type. |
Nearest<T>(RelativeTimeInterval)
Greedy interpolator that selects the available value with an originating time nearest to the interpolation time, within a specified RelativeTimeInterval.
Declaration
public static GreedyInterpolator<T> Nearest<T>(RelativeTimeInterval relativeTimeInterval)
Parameters
Type | Name | Description |
---|---|---|
RelativeTimeInterval | relativeTimeInterval | The relative time interval within which to search for the nearest message. |
Returns
Type | Description |
---|---|
GreedyInterpolator<T> | The greedy interpolator. |
Type Parameters
Name | Description |
---|---|
T | The message type. |
Nearest<T>(TimeSpan)
Greedy interpolator that selects the available value with an originating time nearest to the interpolation time, within a given tolerance.
Declaration
public static GreedyInterpolator<T> Nearest<T>(TimeSpan tolerance)
Parameters
Type | Name | Description |
---|---|---|
TimeSpan | tolerance | The tolerance within which to search for the nearest message. |
Returns
Type | Description |
---|---|
GreedyInterpolator<T> | The greedy interpolator. |
Type Parameters
Name | Description |
---|---|
T | The message type. |
NearestOrDefault<T>(T)
Greedy interpolator that selects the available value with an originating time nearest to the interpolation time, or default if no such value is found.
Declaration
public static GreedyInterpolator<T> NearestOrDefault<T>(T defaultValue = null)
Parameters
Type | Name | Description |
---|---|---|
T | defaultValue | An optional default value to use. |
Returns
Type | Description |
---|---|
GreedyInterpolator<T> | The greedy interpolator. |
Type Parameters
Name | Description |
---|---|
T | The message type. |
NearestOrDefault<T>(RelativeTimeInterval, T)
Greedy interpolator that selects the available value with an originating time nearest to the interpolation time, within a specified RelativeTimeInterval, or default if no such value is found.
Declaration
public static GreedyInterpolator<T> NearestOrDefault<T>(RelativeTimeInterval relativeTimeInterval, T defaultValue = null)
Parameters
Type | Name | Description |
---|---|---|
RelativeTimeInterval | relativeTimeInterval | The relative time interval within which to search for the nearest message. |
T | defaultValue | An optional default value to use. |
Returns
Type | Description |
---|---|
GreedyInterpolator<T> | The greedy interpolator. |
Type Parameters
Name | Description |
---|---|
T | The message type. |
NearestOrDefault<T>(TimeSpan, T)
Greedy interpolator that selects the available value with an originating time nearest to the interpolation time, within a given tolerance, or default if no such value is found.
Declaration
public static GreedyInterpolator<T> NearestOrDefault<T>(TimeSpan tolerance, T defaultValue = null)
Parameters
Type | Name | Description |
---|---|---|
TimeSpan | tolerance | The tolerance within which to search for the nearest message. |
T | defaultValue | An optional default value to use. |
Returns
Type | Description |
---|---|
GreedyInterpolator<T> | The greedy interpolator. |
Type Parameters
Name | Description |
---|---|
T | The message type. |