共用方式為


IReducedFunctionalityReportingService.ReportReducedFunctionalityAsync Method

Definition

Overloads

ReportReducedFunctionalityAsync(String, String, ServiceMoniker, CancellationToken)

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

ReportReducedFunctionalityAsync(String, String, ServiceMoniker, Guid, UInt32, CancellationToken)

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

ReportReducedFunctionalityAsync(String, String, ServiceMoniker, CancellationToken)

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

public System.Threading.Tasks.Task ReportReducedFunctionalityAsync (string reducedFeatureId, string reducedFeature, Microsoft.ServiceHub.Framework.ServiceMoniker serviceMoniker, System.Threading.CancellationToken cancellationToken = default);
abstract member ReportReducedFunctionalityAsync : string * string * Microsoft.ServiceHub.Framework.ServiceMoniker * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function ReportReducedFunctionalityAsync (reducedFeatureId As String, reducedFeature As String, serviceMoniker As ServiceMoniker, Optional cancellationToken As CancellationToken = Nothing) As Task

Parameters

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.

cancellationToken
CancellationToken

A cancellation token.

Returns

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

Applies to

ReportReducedFunctionalityAsync(String, String, ServiceMoniker, Guid, UInt32, CancellationToken)

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

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

Parameters

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 presents UI to inform the user as to why functionality of a feature is reduced or disabled. This UI is modeless and does not steal input focus from the user. This method may log details and/or post telemetry events as well.

Applies to