IObserver<T>.OnNext(T) IObserver<T>.OnNext(T) IObserver<T>.OnNext(T) Method

定義

新しいデータをオブザーバーに提供します。Provides the observer with new data.

public void OnNext (T value);
abstract member OnNext : 'T -> unit
Public Sub OnNext (value As T)

パラメーター

value

現在の通知情報。The current notification information.

次の例の実装を提供する、OnNext追跡アプリケーションの緯度/経度のメソッド。The following example provides an implementation of the OnNext method in a latitude/longitude tracking application. 例を参照してください、IObserver<T>完全な例についてはトピック。See the Example section of the IObserver<T> topic for the complete example.

public virtual void OnNext(Location value)
{
   Console.WriteLine("{2}: The current location is {0}, {1}", value.Latitude, value.Longitude, this.Name);
}
Public Overridable Sub OnNext(ByVal value As Location) Implements System.IObserver(Of Location).OnNext
   Console.WriteLine("{2}: The current location is {0}, {1}", value.Latitude, value.Longitude, Me.Name)
End Sub

注釈

オブザーバーが呼び出されたプロバイダーの後IObservable<T>.Subscribeメソッドに、プロバイダーはオブザーバーのOnNext通知を提供するメソッド。After an observer has called a provider's IObservable<T>.Subscribe method, the provider calls the observer's OnNext method to provide notifications.

適用対象