Share via


ITraceHubRegistrationService.SubscribeToLogVerbosityAsync Method

Definition

Attaches an observer for updates to when logging verbosity state changes.

public:
 System::Threading::Tasks::Task<IDisposable ^> ^ SubscribeToLogVerbosityAsync(IObserver<Microsoft::VisualStudio::RpcContracts::Logging::LogVerbosityState ^> ^ observer, Microsoft::VisualStudio::RpcContracts::Logging::LogId logId, System::Threading::CancellationToken cancellationToken);
public System.Threading.Tasks.Task<IDisposable> SubscribeToLogVerbosityAsync (IObserver<Microsoft.VisualStudio.RpcContracts.Logging.LogVerbosityState> observer, Microsoft.VisualStudio.RpcContracts.Logging.LogId logId, System.Threading.CancellationToken cancellationToken);
abstract member SubscribeToLogVerbosityAsync : IObserver<Microsoft.VisualStudio.RpcContracts.Logging.LogVerbosityState> * Microsoft.VisualStudio.RpcContracts.Logging.LogId * System.Threading.CancellationToken -> System.Threading.Tasks.Task<IDisposable>
Public Function SubscribeToLogVerbosityAsync (observer As IObserver(Of LogVerbosityState), logId As LogId, cancellationToken As CancellationToken) As Task(Of IDisposable)

Parameters

observer
IObserver<LogVerbosityState>

An observer of logging verbosity state changes.

logId
LogId

The LogId of the log you wish to subscribe receive verbosity change events for.

cancellationToken
CancellationToken

A cancellation token.

Returns

A value that may be disposed of to unregister the observer from future notifications.

Remarks

The initial state of open code containers will be sent immediately to the observer.

This method was added in Visual Studio 16.9.

Applies to