Share via


GlobalBrokeredServiceContainer.ExportDiagnosticsAsync Method

Definition

Writes a bunch of diagnostic data to a JSON file.

public System.Threading.Tasks.Task ExportDiagnosticsAsync (string filePath, Microsoft.VisualStudio.Shell.ServiceBroker.ServiceAudience serviceAudience, System.Threading.CancellationToken cancellationToken = default);
abstract member ExportDiagnosticsAsync : string * Microsoft.VisualStudio.Shell.ServiceBroker.ServiceAudience * System.Threading.CancellationToken -> System.Threading.Tasks.Task
override this.ExportDiagnosticsAsync : string * Microsoft.VisualStudio.Shell.ServiceBroker.ServiceAudience * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function ExportDiagnosticsAsync (filePath As String, serviceAudience As ServiceAudience, Optional cancellationToken As CancellationToken = Nothing) As Task

Parameters

filePath
String

The path to the JSON file to be written. If it already exists it will be overwritten.

serviceAudience
ServiceAudience

The audience.

cancellationToken
CancellationToken

A cancellation token.

Returns

A task that completes when the writing is done.

Implements

Remarks

Rough schema of JSON file:

{
  "perspectiveAudience": "Process",
  "activeRemoteSources" : [ "TrustedServer" ],
  "brokeredServices": [
    {
      name: "Calculator",
      version: "1.0",
      audience: "Local, Process, Guest",
      allowGuestClients: false,
      profferingPackage: "{28074D43-B498-47FE-97CF-4A182DA71C59}"
      profferedLocally: true,
      activeSource: "TrustedServer",
      includedByRemoteSourceManifest: true
    },
    {
      // ...
    },
    // ...
  ]
}

Applies to