Share via


ConnectedServiceGrid.ConfigureServiceAsync(CancellationToken) Method

Definition

Configure a service either through a dialog or linking to the configure web page.

public:
 virtual System::Threading::Tasks::Task ^ ConfigureServiceAsync(System::Threading::CancellationToken ct);
public virtual System.Threading.Tasks.Task ConfigureServiceAsync (System.Threading.CancellationToken ct);
abstract member ConfigureServiceAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task
override this.ConfigureServiceAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Overridable Function ConfigureServiceAsync (ct As CancellationToken) As Task

Parameters

ct
CancellationToken

CancellationToken used to cancel the configuration operation.

Returns

Returns a Task for the configuration.

Remarks

This method is guaranteed to be called from the UI thread.

If an implementation desires to present blocking/modal UI, it may do so. If the service is configured synchronously before the method returns, the returned Task should be marked as completed (for example, via Task.FromResult()).

If the implementation runs in the background, it may return an in-progress Task, and the Connected Services code will refresh the UI once the Task completes. In this case, the Connected Services code may cancel the task via the CancellationToken if the user closes the Conencted Services UI before the service has been configured.

If the implementation shows/handles any errors, the Task should not fault on them, nor throw them as Exceptions. If the returned Task completes in a Faulted state (such that the Exception member is non-null) the Connected Services UI will inform the user of the failure.

Applies to