Compartilhar via


ServiceBrokerExtensions.ReportMissingServiceAsync Method

Definition

Presents modeless UI to the user that explains why a feature is disabled or operating with reduced functionality.

public static System.Threading.Tasks.Task ReportMissingServiceAsync (this Microsoft.ServiceHub.Framework.IServiceBroker serviceBroker, string reducedFeatureId, string reducedFeature, Microsoft.ServiceHub.Framework.ServiceMoniker serviceMoniker, Guid toolWindowGuid = default, uint toolWindowInstanceId = 0, System.Threading.CancellationToken cancellationToken = default);
static member ReportMissingServiceAsync : Microsoft.ServiceHub.Framework.IServiceBroker * string * string * Microsoft.ServiceHub.Framework.ServiceMoniker * Guid * uint32 * System.Threading.CancellationToken -> System.Threading.Tasks.Task
<Extension()>
Public Function ReportMissingServiceAsync (serviceBroker As IServiceBroker, reducedFeatureId As String, reducedFeature As String, serviceMoniker As ServiceMoniker, Optional toolWindowGuid As Guid = Nothing, Optional toolWindowInstanceId As UInteger = 0, Optional cancellationToken As CancellationToken = Nothing) As Task

Parameters

serviceBroker
IServiceBroker

The service broker that failed to produce the brokered service.

reducedFeatureId
String

A non-localized string that identifies the feature that is disabled or operating with reduced functionality. This string should be relatively static as it is used as a key to recognize and prevent redundant UI when the same feature reports failure multiple times. It may also be used in telemetry events to identify the impact of a missing service.

reducedFeature
String

A localized display name for the feature that is disabled or operating with reduced functionality. This string is inserted into the placeholder of a larger string in a singular grammatical context (e.g. "{Your feature} is broken"). While this value may use Title Case for the feature name, it should not contain punctuation.

serviceMoniker
ServiceMoniker

The moniker for the brokered service that is not available.

toolWindowGuid
Guid

The GUID for the tool window that hosts the feature's UI, if any. An infobar may be added to this tool window.

toolWindowInstanceId
UInt32

The ID of the multi-instance tool window specified by toolWindowGuid that the user was interacting with or otherwise should show the infobar, when applicable.

cancellationToken
CancellationToken

A cancellation token.

Returns

A task that represents the task of presenting UI to the user.

Remarks

This method is a stub for calling ReportReducedFunctionalityAsync(String, String, ServiceMoniker, Guid, UInt32, CancellationToken) on the ReducedFunctionalityReportingService service.

Applies to