Share via


IVisualizerTargetClient.NotifyStateChangeAsync Method

Definition

Notifies the debugger visualizer about a change of state of the visualizer target.

public System.Threading.Tasks.Task NotifyStateChangeAsync (Microsoft.VisualStudio.RpcContracts.DebuggerVisualizers.VisualizerTargetStateNotification notification, System.Threading.CancellationToken cancellationToken);
abstract member NotifyStateChangeAsync : Microsoft.VisualStudio.RpcContracts.DebuggerVisualizers.VisualizerTargetStateNotification * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function NotifyStateChangeAsync (notification As VisualizerTargetStateNotification, cancellationToken As CancellationToken) As Task

Parameters

notification
VisualizerTargetStateNotification

The type of the notification.

cancellationToken
CancellationToken

Cancellation token for the async call.

Returns

A Task tracking the completion of the async call.

Remarks

The debugger should consider the completion of the returned Task as an indication that the debugger visualizer has completed the update of the data context of the corresponding IRemoteUserControl.

Possible notifications include:

  • Changes of availability: The visualizer target is only available when the debug session is active and the debug target is paused. When the visualizer target is not available, calls to RequestDataAsync(Nullable<ReadOnlySequence<Byte>>, CancellationToken) will fail with a VisualizerTargetUnavailableException. When the visualizer target becomes available again, the value of the target object should be considered outdated and should be retrieved again.
  • Notifications that the value of the target object may have changed and should be retrieved again.

Applies to