Observable.MostRecent<TSource> メソッド

監視可能なシーケンスの最新の値をサンプリングします。

Namespace:System.Reactive.Linq
アセンブリ: System.Reactive (System.Reactive.dll)

構文

'Declaration
<ExtensionAttribute> _
Public Shared Function MostRecent(Of TSource) ( _
    source As IObservable(Of TSource), _
    initialValue As TSource _
) As IEnumerable(Of TSource)
'Usage
Dim source As IObservable(Of TSource)
Dim initialValue As TSource
Dim returnValue As IEnumerable(Of TSource)

returnValue = source.MostRecent(initialValue)
public static IEnumerable<TSource> MostRecent<TSource>(
    this IObservable<TSource> source,
    TSource initialValue
)
[ExtensionAttribute]
public:
generic<typename TSource>
static IEnumerable<TSource>^ MostRecent(
    IObservable<TSource>^ source, 
    TSource initialValue
)
static member MostRecent : 
        source:IObservable<'TSource> * 
        initialValue:'TSource -> IEnumerable<'TSource> 
JScript does not support generic types and methods.

型パラメーター

  • TSource
    ソースの種類。

パラメーター

  • initialValue
    種類: TSource
    要素がまだサンプリングされていない場合に列挙可能なシーケンスによって生成される初期値。

戻り値

型: System.Collections.Generic.IEnumerable<TSource>
各イテレーションで最後にサンプリングされた要素を返す列挙可能なシーケンス。

使用上の注意

Visual Basic および C# では、 IObservable<TSource> 型の任意のオブジェクトでインスタンス メソッドとしてこのメソッドを呼び出すことができます。 インスタンス メソッド構文を使用してこのメソッドを呼び出す場合は、最初のパラメーターを省略します。 詳細については、」または」を参照してください。

参照

リファレンス

Observable クラス

System.Reactive.Linq 名前空間