다음을 통해 공유


FabricClient.ServiceManagementClient.GetServiceDescriptionAsync Method

Definition

Overloads

GetServiceDescriptionAsync(Uri)

Gets the Service Description for the specified service instance.

GetServiceDescriptionAsync(Uri, TimeSpan, CancellationToken)

Gets the Service Description for the specified service instance. Also takes in timeout interval, which is the maximum of time the system will allow this operation to continue before returning TimeoutException and cancellation-token that the operation is observing.

GetServiceDescriptionAsync(Uri)

Gets the Service Description for the specified service instance.

public System.Threading.Tasks.Task<System.Fabric.Description.ServiceDescription> GetServiceDescriptionAsync (Uri serviceName);
member this.GetServiceDescriptionAsync : Uri -> System.Threading.Tasks.Task<System.Fabric.Description.ServiceDescription>
Public Function GetServiceDescriptionAsync (serviceName As Uri) As Task(Of ServiceDescription)

Parameters

serviceName
Uri

The Service Fabric Name of the service.

Returns

The Service Description for the specified service instance.

Exceptions

The FabricClient object is in a closed state. Dispose of the FabricClient object you are using and instantiate a new FabricClient object.

When serviceName is null.

Remarks

The default timeout is one minute for which the system will allow this operation to continue before returning TimeoutException.

GetServiceDescriptionAsync(Uri) is the most efficient way of determining whether a name is associated with a service.

Applies to

GetServiceDescriptionAsync(Uri, TimeSpan, CancellationToken)

Gets the Service Description for the specified service instance. Also takes in timeout interval, which is the maximum of time the system will allow this operation to continue before returning TimeoutException and cancellation-token that the operation is observing.

public System.Threading.Tasks.Task<System.Fabric.Description.ServiceDescription> GetServiceDescriptionAsync (Uri serviceName, TimeSpan timeout, System.Threading.CancellationToken cancellationToken);
member this.GetServiceDescriptionAsync : Uri * TimeSpan * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Fabric.Description.ServiceDescription>
Public Function GetServiceDescriptionAsync (serviceName As Uri, timeout As TimeSpan, cancellationToken As CancellationToken) As Task(Of ServiceDescription)

Parameters

serviceName
Uri

The Service Fabric Name of the service.

timeout
TimeSpan

The maximum amount of time the system will allow this operation to continue before returning TimeoutException.

cancellationToken
CancellationToken

The CancellationToken that the operation is observing. It can be used to propagate notification that the operation should be canceled.

Returns

The Service Description for the specified service instance.

Exceptions

The FabricClient object is in a closed state. Dispose of the FabricClient object you are using and instantiate a new FabricClient object.

When serviceName is null.

Remarks

GetServiceDescriptionAsync(Uri) is the most efficient way of determining whether a name is associated with a service.

Applies to