Share via


ConnectedServiceHandler.AddServiceInstanceAsync Method

Definition

Given a connected service instance, add the necessary files and SDKs to the project in order to enable the given service.

public:
 abstract System::Threading::Tasks::Task<Microsoft::VisualStudio::ConnectedServices::AddServiceInstanceResult ^> ^ AddServiceInstanceAsync(Microsoft::VisualStudio::ConnectedServices::ConnectedServiceHandlerContext ^ context, System::Threading::CancellationToken ct);
public abstract System.Threading.Tasks.Task<Microsoft.VisualStudio.ConnectedServices.AddServiceInstanceResult> AddServiceInstanceAsync (Microsoft.VisualStudio.ConnectedServices.ConnectedServiceHandlerContext context, System.Threading.CancellationToken ct);
abstract member AddServiceInstanceAsync : Microsoft.VisualStudio.ConnectedServices.ConnectedServiceHandlerContext * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.VisualStudio.ConnectedServices.AddServiceInstanceResult>
Public MustOverride Function AddServiceInstanceAsync (context As ConnectedServiceHandlerContext, ct As CancellationToken) As Task(Of AddServiceInstanceResult)

Parameters

context
ConnectedServiceHandlerContext

The handler context containing information such as the ConnectedServiceInstance that should be added to the project, the project that it should be added to, and other services.

ct
CancellationToken

Cancellation Token to track cancellation.

Returns

Returns an AddServiceInstanceResult that contains information for the service folder and launching GettingStarted information after AddServiceInstanceAsync has completed.

Remarks

The context's logger will write any status messages to the caller. This will include warnings and failures that occurred while trying to add a new file, SDK references, or injecting code.

Applies to