IObserver<T>::OnCompleted Method ()

.NET Framework (current version)

The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Notifies the observer that the provider has finished sending push-based notifications.

Namespace:   System
Assembly:  mscorlib (in mscorlib.dll)

void OnCompleted()

When the observer's OnCompleted implementation is called, the OnCompleted method can optionally call the Dispose method of the IDisposable object that was returned to the observer when it called the IObservable<T>::Subscribe method.

The following example provides an implementation of the OnCompleted method in a latitude/longitude tracking application. The method simply reports that no further data is available and calls the provider's IDisposable::Dispose implementation. See the Example section of the IObserver<T> topic for the complete example.

No code example is currently available or this language may not be supported.

Universal Windows Platform
Available since 8
.NET Framework
Available since 4.0
Portable Class Library
Supported in: portable .NET platforms
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Return to top