Table of Contents

Class CloudTableClient

Namespace
Microsoft.WindowsAzure.Storage.Table
Assembly
Microsoft.WindowsAzure.Storage.dll

Provides a client-side logical representation of the Microsoft Azure Table Service. This client is used to configure and execute requests against the Table Service.

public class CloudTableClient
Inheritance
CloudTableClient
Inherited Members

Remarks

The service client encapsulates the endpoint or endpoints for the Table service. If the service client will be used for authenticated access, it also encapsulates the credentials for accessing the storage account.

Constructors

CloudTableClient(StorageUri, StorageCredentials)

Initializes a new instance of the CloudTableClient class using the specified Table service endpoint and account credentials.

public CloudTableClient(StorageUri storageUri, StorageCredentials credentials)

Parameters

storageUri StorageUri

A StorageUri object containing the Table service endpoint to use to create the client.

credentials StorageCredentials

A StorageCredentials object.

CloudTableClient(Uri, StorageCredentials)

Initializes a new instance of the CloudTableClient class using the specified Table service endpoint and account credentials.

public CloudTableClient(Uri baseUri, StorageCredentials credentials)

Parameters

baseUri Uri

A System.Uri object containing the Table service endpoint to use to create the client.

credentials StorageCredentials

A StorageCredentials object.

Properties

AuthenticationScheme

Gets or sets the authentication scheme to use to sign HTTP requests.

public AuthenticationScheme AuthenticationScheme { get; set; }

Property Value

AuthenticationScheme

Remarks

This property is set only when Shared Key or Shared Key Lite credentials are used; it does not apply to authentication via a shared access signature or anonymous access.

BaseUri

Gets the base URI for the Table service client at the primary location.

public Uri BaseUri { get; }

Property Value

Uri

A System.Uri object containing the base URI used to construct the Table service client at the primary location.

BufferManager

Gets or sets a buffer manager that implements the IBufferManager interface, specifying a buffer pool for use with operations against the Table service client.

public IBufferManager BufferManager { get; set; }

Property Value

IBufferManager

An object of type IBufferManager.

Credentials

Gets the account credentials used to create the Table service client.

public StorageCredentials Credentials { get; }

Property Value

StorageCredentials

A StorageCredentials object.

DefaultRequestOptions

Gets or sets the default request options for requests made via the Table service client.

public TableRequestOptions DefaultRequestOptions { get; set; }

Property Value

TableRequestOptions

A TableRequestOptions object.

StorageUri

Gets the Table service endpoints for both the primary and secondary locations.

public StorageUri StorageUri { get; }

Property Value

StorageUri

An object of type StorageUri containing Table service URIs for both the primary and secondary locations.

Methods

BeginGetServiceProperties(TableRequestOptions, OperationContext, AsyncCallback, object)

Begins an asynchronous operation to get the service properties of the Table service.

[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginGetServiceProperties(TableRequestOptions requestOptions, OperationContext operationContext, AsyncCallback callback, object state)

Parameters

requestOptions TableRequestOptions

A TableRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

callback AsyncCallback

An AsyncCallback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object to be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

BeginGetServiceProperties(AsyncCallback, object)

Begins an asynchronous operation to get the service properties of the Table service.

[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginGetServiceProperties(AsyncCallback callback, object state)

Parameters

callback AsyncCallback

An AsyncCallback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object to be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

BeginGetServiceStats(TableRequestOptions, OperationContext, AsyncCallback, object)

Begins an asynchronous operation to get service stats for the secondary Table service endpoint.

[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginGetServiceStats(TableRequestOptions requestOptions, OperationContext operationContext, AsyncCallback callback, object state)

Parameters

requestOptions TableRequestOptions

A TableRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

callback AsyncCallback

An AsyncCallback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object to be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

BeginGetServiceStats(AsyncCallback, object)

Begins an asynchronous operation to get service stats for the secondary Table service endpoint.

[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginGetServiceStats(AsyncCallback callback, object state)

Parameters

callback AsyncCallback

An AsyncCallback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object to be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

BeginListTablesSegmented(TableContinuationToken, AsyncCallback, object)

Begins an asynchronous operation to return a result segment of tables.

[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginListTablesSegmented(TableContinuationToken currentToken, AsyncCallback callback, object state)

Parameters

currentToken TableContinuationToken

A TableContinuationToken returned by a previous listing operation.

callback AsyncCallback

An AsyncCallback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object that will be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

BeginListTablesSegmented(string, TableContinuationToken, AsyncCallback, object)

Begins an asynchronous operation to return a result segment of tables that start with the specified prefix.

[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginListTablesSegmented(string prefix, TableContinuationToken currentToken, AsyncCallback callback, object state)

Parameters

prefix string

A string containing the table name prefix.

currentToken TableContinuationToken

A TableContinuationToken returned by a previous listing operation.

callback AsyncCallback

An AsyncCallback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object that will be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

BeginListTablesSegmented(string, int?, TableContinuationToken, TableRequestOptions, OperationContext, AsyncCallback, object)

Begins an asynchronous operation to return a result segment of tables that start with the specified prefix.

[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginListTablesSegmented(string prefix, int? maxResults, TableContinuationToken currentToken, TableRequestOptions requestOptions, OperationContext operationContext, AsyncCallback callback, object state)

Parameters

prefix string

A string containing the table name prefix.

maxResults int?

A non-negative integer value that indicates the maximum number of results to be returned at a time, up to the per-operation limit of 5000. If this value is null, the maximum possible number of results will be returned, up to 5000.

currentToken TableContinuationToken

A TableContinuationToken returned by a previous listing operation.

requestOptions TableRequestOptions

The server timeout, maximum execution time, and retry policies for the operation.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

callback AsyncCallback

An AsyncCallback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object that will be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

BeginSetServiceProperties(ServiceProperties, TableRequestOptions, OperationContext, AsyncCallback, object)

Begins an asynchronous operation to set the service properties of the Table service.

[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginSetServiceProperties(ServiceProperties properties, TableRequestOptions requestOptions, OperationContext operationContext, AsyncCallback callback, object state)

Parameters

properties ServiceProperties

A ServiceProperties object.

requestOptions TableRequestOptions

A TableRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

callback AsyncCallback

An AsyncCallback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object to be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

BeginSetServiceProperties(ServiceProperties, AsyncCallback, object)

Begins an asynchronous operation to set the service properties of the Table service.

[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginSetServiceProperties(ServiceProperties properties, AsyncCallback callback, object state)

Parameters

properties ServiceProperties

A ServiceProperties object.

callback AsyncCallback

An AsyncCallback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object to be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

EndGetServiceProperties(IAsyncResult)

Ends an asynchronous operation to get the service properties of the Table service.

public virtual ServiceProperties EndGetServiceProperties(IAsyncResult asyncResult)

Parameters

asyncResult IAsyncResult

The result returned from a prior call to BeginGetServiceProperties(AsyncCallback, object).

Returns

ServiceProperties

A ServiceProperties object.

EndGetServiceStats(IAsyncResult)

Ends an asynchronous operation to get service stats for the secondary Table service endpoint.

public virtual ServiceStats EndGetServiceStats(IAsyncResult asyncResult)

Parameters

asyncResult IAsyncResult

An IAsyncResult that references the pending asynchronous operation.

Returns

ServiceStats

A ServiceStats object.

EndListTablesSegmented(IAsyncResult)

Ends an asynchronous operation to return a result segment of tables.

public virtual TableResultSegment EndListTablesSegmented(IAsyncResult asyncResult)

Parameters

asyncResult IAsyncResult

An IAsyncResult that references the pending asynchronous operation.

Returns

TableResultSegment

A TableResultSegment object.

EndSetServiceProperties(IAsyncResult)

Ends an asynchronous operation to set the service properties of the Table service.

public virtual void EndSetServiceProperties(IAsyncResult asyncResult)

Parameters

asyncResult IAsyncResult

The result returned from a prior call to BeginSetServiceProperties(ServiceProperties, AsyncCallback, object)

GetServiceProperties(TableRequestOptions, OperationContext)

Gets the service properties for the Table service.

[DoesServiceRequest]
public virtual ServiceProperties GetServiceProperties(TableRequestOptions requestOptions = null, OperationContext operationContext = null)

Parameters

requestOptions TableRequestOptions

A TableRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

ServiceProperties

A ServiceProperties object.

GetServicePropertiesAsync()

Initiates an asynchronous operation to get the service properties of the Table service.

[DoesServiceRequest]
public virtual Task<ServiceProperties> GetServicePropertiesAsync()

Returns

Task<ServiceProperties>

A Task<TResult> object that represents the asynchronous operation.

GetServicePropertiesAsync(TableRequestOptions, OperationContext)

Initiates an asynchronous operation to get the service properties of the Table service.

[DoesServiceRequest]
public virtual Task<ServiceProperties> GetServicePropertiesAsync(TableRequestOptions requestOptions, OperationContext operationContext)

Parameters

requestOptions TableRequestOptions

A TableRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

Task<ServiceProperties>

A Task<TResult> object of type ServiceProperties that represents the asynchronous operation.

GetServicePropertiesAsync(TableRequestOptions, OperationContext, CancellationToken)

Initiates an asynchronous operation to get the service properties of the Table service.

[DoesServiceRequest]
public virtual Task<ServiceProperties> GetServicePropertiesAsync(TableRequestOptions requestOptions, OperationContext operationContext, CancellationToken cancellationToken)

Parameters

requestOptions TableRequestOptions

A TableRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task<ServiceProperties>

A Task<TResult> object of type ServiceProperties that represents the asynchronous operation.

GetServicePropertiesAsync(CancellationToken)

Initiates an asynchronous operation to get the service properties of the Table service.

[DoesServiceRequest]
public virtual Task<ServiceProperties> GetServicePropertiesAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task<ServiceProperties>

A Task<TResult> object of type ServiceProperties that represents the asynchronous operation.

GetServiceStats(TableRequestOptions, OperationContext)

Gets service stats for the secondary Table service endpoint.

[DoesServiceRequest]
public virtual ServiceStats GetServiceStats(TableRequestOptions requestOptions = null, OperationContext operationContext = null)

Parameters

requestOptions TableRequestOptions

A TableRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

ServiceStats

A ServiceStats object.

GetServiceStatsAsync()

Initiates an asynchronous operation to get service stats for the secondary Table service endpoint.

[DoesServiceRequest]
public virtual Task<ServiceStats> GetServiceStatsAsync()

Returns

Task<ServiceStats>

A Task<TResult> object of type ServiceStats that represents the asynchronous operation.

GetServiceStatsAsync(TableRequestOptions, OperationContext)

Initiates an asynchronous operation to get service stats for the secondary Table service endpoint.

[DoesServiceRequest]
public virtual Task<ServiceStats> GetServiceStatsAsync(TableRequestOptions requestOptions, OperationContext operationContext)

Parameters

requestOptions TableRequestOptions

A TableRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

Task<ServiceStats>

A Task<TResult> object of type ServiceStats that represents the asynchronous operation.

GetServiceStatsAsync(TableRequestOptions, OperationContext, CancellationToken)

Initiates an asynchronous operation to get service stats for the secondary Table service endpoint.

[DoesServiceRequest]
public virtual Task<ServiceStats> GetServiceStatsAsync(TableRequestOptions requestOptions, OperationContext operationContext, CancellationToken cancellationToken)

Parameters

requestOptions TableRequestOptions

A TableRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task<ServiceStats>

A Task<TResult> object of type ServiceStats that represents the asynchronous operation.

GetServiceStatsAsync(CancellationToken)

Initiates an asynchronous operation to get service stats for the secondary Table service endpoint.

[DoesServiceRequest]
public virtual Task<ServiceStats> GetServiceStatsAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task<ServiceStats>

A Task<TResult> object of type ServiceStats that represents the asynchronous operation.

GetTableReference(string)

Gets a reference to the specified table.

public virtual CloudTable GetTableReference(string tableName)

Parameters

tableName string

A string containing the name of the table.

Returns

CloudTable

A CloudTable object.

ListTables(string, TableRequestOptions, OperationContext)

Returns an enumerable collection of tables, retrieved lazily, that start with the specified prefix.

[DoesServiceRequest]
public virtual IEnumerable<CloudTable> ListTables(string prefix = null, TableRequestOptions requestOptions = null, OperationContext operationContext = null)

Parameters

prefix string

A string containing the table name prefix.

requestOptions TableRequestOptions

A TableRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

IEnumerable<CloudTable>

An enumerable collection of CloudTable objects that are retrieved lazily.

ListTablesSegmented(TableContinuationToken)

Returns a result segment of tables.

[DoesServiceRequest]
public virtual TableResultSegment ListTablesSegmented(TableContinuationToken currentToken)

Parameters

currentToken TableContinuationToken

A TableContinuationToken returned by a previous listing operation.

Returns

TableResultSegment

A TableResultSegment object.

ListTablesSegmented(string, TableContinuationToken)

Returns a result segment of tables, retrieved lazily, that start with the specified prefix.

[DoesServiceRequest]
public virtual TableResultSegment ListTablesSegmented(string prefix, TableContinuationToken currentToken)

Parameters

prefix string

A string containing the table name prefix.

currentToken TableContinuationToken

A TableContinuationToken returned by a previous listing operation.

Returns

TableResultSegment

A TableResultSegment object.

ListTablesSegmented(string, int?, TableContinuationToken, TableRequestOptions, OperationContext)

Returns a result segment of tables, retrieved lazily, that start with the specified prefix.

[DoesServiceRequest]
public virtual TableResultSegment ListTablesSegmented(string prefix, int? maxResults, TableContinuationToken currentToken, TableRequestOptions requestOptions = null, OperationContext operationContext = null)

Parameters

prefix string

A string containing the table name prefix.

maxResults int?

A non-negative integer value that indicates the maximum number of results to be returned at a time, up to the per-operation limit of 5000. If this value is null, the maximum possible number of results will be returned, up to 5000.

currentToken TableContinuationToken

A TableContinuationToken returned by a previous listing operation.

requestOptions TableRequestOptions

A TableRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

TableResultSegment

A TableResultSegment object.

ListTablesSegmentedAsync(TableContinuationToken)

Initiates an asynchronous operation to return a result segment of tables.

[DoesServiceRequest]
public virtual Task<TableResultSegment> ListTablesSegmentedAsync(TableContinuationToken currentToken)

Parameters

currentToken TableContinuationToken

A TableContinuationToken returned by a previous listing operation.

Returns

Task<TableResultSegment>

A Task<TResult> object of type TableResultSegment that represents the asynchronous operation.

ListTablesSegmentedAsync(TableContinuationToken, CancellationToken)

Initiates an asynchronous operation to return a result segment of tables.

[DoesServiceRequest]
public virtual Task<TableResultSegment> ListTablesSegmentedAsync(TableContinuationToken currentToken, CancellationToken cancellationToken)

Parameters

currentToken TableContinuationToken

A TableContinuationToken returned by a previous listing operation.

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task<TableResultSegment>

A Task<TResult> object of type TableResultSegment that represents the asynchronous operation.

ListTablesSegmentedAsync(string, TableContinuationToken)

Initiates an asynchronous operation to return a result segment of tables that start with the specified prefix.

[DoesServiceRequest]
public virtual Task<TableResultSegment> ListTablesSegmentedAsync(string prefix, TableContinuationToken currentToken)

Parameters

prefix string

A string containing the table name prefix.

currentToken TableContinuationToken

A TableContinuationToken returned by a previous listing operation.

Returns

Task<TableResultSegment>

A Task<TResult> object of type TableResultSegment that represents the asynchronous operation.

ListTablesSegmentedAsync(string, TableContinuationToken, CancellationToken)

Initiates an asynchronous operation to return a result segment of tables that start with the specified prefix.

[DoesServiceRequest]
public virtual Task<TableResultSegment> ListTablesSegmentedAsync(string prefix, TableContinuationToken currentToken, CancellationToken cancellationToken)

Parameters

prefix string

A string containing the table name prefix.

currentToken TableContinuationToken

A TableContinuationToken returned by a previous listing operation.

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task<TableResultSegment>

A Task<TResult> object of type TableResultSegment that represents the asynchronous operation.

ListTablesSegmentedAsync(string, int?, TableContinuationToken, TableRequestOptions, OperationContext)

Initiates an asynchronous operation to return a result segment of tables that start with the specified prefix.

[DoesServiceRequest]
public virtual Task<TableResultSegment> ListTablesSegmentedAsync(string prefix, int? maxResults, TableContinuationToken currentToken, TableRequestOptions requestOptions, OperationContext operationContext)

Parameters

prefix string

A string containing the table name prefix.

maxResults int?

A non-negative integer value that indicates the maximum number of results to be returned at a time, up to the per-operation limit of 5000. If this value is null, the maximum possible number of results will be returned, up to 5000.

currentToken TableContinuationToken

A TableContinuationToken returned by a previous listing operation.

requestOptions TableRequestOptions

The server timeout, maximum execution time, and retry policies for the operation.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

Task<TableResultSegment>

A Task<TResult> object of type TableResultSegment that represents the asynchronous operation.

ListTablesSegmentedAsync(string, int?, TableContinuationToken, TableRequestOptions, OperationContext, CancellationToken)

Initiates an asynchronous operation to return a result segment of tables that start with the specified prefix.

[DoesServiceRequest]
public virtual Task<TableResultSegment> ListTablesSegmentedAsync(string prefix, int? maxResults, TableContinuationToken currentToken, TableRequestOptions requestOptions, OperationContext operationContext, CancellationToken cancellationToken)

Parameters

prefix string

A string containing the table name prefix.

maxResults int?

A non-negative integer value that indicates the maximum number of results to be returned at a time, up to the per-operation limit of 5000. If this value is null, the maximum possible number of results will be returned, up to 5000.

currentToken TableContinuationToken

A TableContinuationToken returned by a previous listing operation.

requestOptions TableRequestOptions

The server timeout, maximum execution time, and retry policies for the operation.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task<TableResultSegment>

A Task<TResult> object of type TableResultSegment that represents the asynchronous operation.

SetServiceProperties(ServiceProperties, TableRequestOptions, OperationContext)

Sets the service properties of the Table service.

[DoesServiceRequest]
public virtual void SetServiceProperties(ServiceProperties properties, TableRequestOptions requestOptions = null, OperationContext operationContext = null)

Parameters

properties ServiceProperties

A ServiceProperties object.

requestOptions TableRequestOptions

A TableRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

SetServicePropertiesAsync(ServiceProperties)

Initiates an asynchronous operation to set the service properties of the Table service.

[DoesServiceRequest]
public virtual Task SetServicePropertiesAsync(ServiceProperties properties)

Parameters

properties ServiceProperties

A ServiceProperties object.

Returns

Task

A Task object that represents the asynchronous operation.

SetServicePropertiesAsync(ServiceProperties, TableRequestOptions, OperationContext)

Initiates an asynchronous operation to set the service properties of the Table service.

[DoesServiceRequest]
public virtual Task SetServicePropertiesAsync(ServiceProperties properties, TableRequestOptions requestOptions, OperationContext operationContext)

Parameters

properties ServiceProperties

A ServiceProperties object.

requestOptions TableRequestOptions

A TableRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

Task

A Task object that represents the asynchronous operation.

SetServicePropertiesAsync(ServiceProperties, TableRequestOptions, OperationContext, CancellationToken)

Initiates an asynchronous operation to set the service properties of the Table service.

[DoesServiceRequest]
public virtual Task SetServicePropertiesAsync(ServiceProperties properties, TableRequestOptions requestOptions, OperationContext operationContext, CancellationToken cancellationToken)

Parameters

properties ServiceProperties

A ServiceProperties object.

requestOptions TableRequestOptions

A TableRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task

A Task object that represents the asynchronous operation.

SetServicePropertiesAsync(ServiceProperties, CancellationToken)

Initiates an asynchronous operation to set the service properties of the Table service.

[DoesServiceRequest]
public virtual Task SetServicePropertiesAsync(ServiceProperties properties, CancellationToken cancellationToken)

Parameters

properties ServiceProperties

A ServiceProperties object.

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task

A Task object that represents the asynchronous operation.