Share via


CimAsyncMultipleResults<T>.Subscribe Method (IObserver<T>)

 

Starts the operation and then communicates the results back to the given observer.

Namespace:   Microsoft.Management.Infrastructure.Generic
Assembly:  Microsoft.Management.Infrastructure (in Microsoft.Management.Infrastructure.dll)

Syntax

public IDisposable Subscribe(
    IObserver<T> observer
)
public:
virtual IDisposable^ Subscribe(
    IObserver<T>^ observer
) sealed
abstract Subscribe : 
        observer:IObserver<'T> -> IDisposable
override Subscribe : 
        observer:IObserver<'T> -> IDisposable
Public Function Subscribe (
    observer As IObserver(Of T)
) As IDisposable

Parameters

  • observer
    Type: System.IObserver<T>

    An observer that will receive asynchronous notifications about the results of the operation.

Return Value

Type: System.IDisposable

A disposable object that, when disposed, initiates the cancellation process and suppress further callbacks to the IObserver(T) instance.

Implements

IObservable<T>.Subscribe(IObserver<T>)

Remarks

This method may be called more than once. Second and subsequent calls do not have any effect.

See Also

CimAsyncMultipleResults<T> Class
Microsoft.Management.Infrastructure.Generic Namespace

Return to top