DocumentClient.OpenAsync Method

Definition

Open the connection to validate that the client initialization is successful in the Azure DocumentDB database service.

public System.Threading.Tasks.Task OpenAsync (System.Threading.CancellationToken token = null);
Parameters
Returns

A Task object.

Remarks

This method is recommended to be called, after the constructor, but before calling any other methods on the DocumentClient instance. If there are any initialization exceptions, this method will throw them (set on the task). Alternately, calling any API will throw initialization exception at the first call.