CloudQueuesProviderGetHomeAsync Method |
This API is preliminary and subject to change.
Gets the home document describing the operations supported by the service.
Namespace: net.openstack.Providers.RackspaceAssembly: openstacknet (in openstacknet.dll) Version: 1.7.7+Branch.master.Sha.25d803f397c8693c2c13777ef6675f796f520f2c
Syntaxpublic Task<HomeDocument> GetHomeAsync(
CancellationToken cancellationToken
)
Public Function GetHomeAsync (
cancellationToken As CancellationToken
) As Task(Of HomeDocument)
public:
virtual Task<HomeDocument^>^ GetHomeAsync(
CancellationToken cancellationToken
) sealed
abstract GetHomeAsync :
cancellationToken : CancellationToken -> Task<HomeDocument>
override GetHomeAsync :
cancellationToken : CancellationToken -> Task<HomeDocument>
Parameters
- cancellationToken
- Type: System.ThreadingCancellationToken
The CancellationToken that the task will observe.
Return Value
Type:
TaskHomeDocumentA
Task object representing the asynchronous operation. When the task completes successfully, the
Result property will contain a
HomeDocument object describing the operations supported by the service.
Implements
IQueueingServiceGetHomeAsync(CancellationToken)
ExceptionsException | Condition |
---|
WebException | If the REST request does not return successfully. |
ExamplesThe following example demonstrates the use of this method using the CloudQueuesProvider
implementation of the IQueueingService. For more information about creating the provider, see
CloudQueuesProvider(CloudIdentity, String, Guid, Boolean, IIdentityProvider).
Note |
---|
The following code uses the / operators. For more information
about using these operators in your code, see Asynchronous Services.
|
IQueueingService queueingService = new CloudQueuesProvider(identity, region, clientId, internalUrl, identityProvider);
HomeDocument createdQueue = await queueingService.GetHomeAsync(CancellationToken.None);
Dim queueingService As IQueueingService = New CloudQueuesProvider(identity, region, clientId, internalUrl, identityProvider)
Dim homeDocument = Await queueingService.GetHomeAsync(CancellationToken.None)
No code example is currently available or this language may not be supported.
let queueingService = new CloudQueuesProvider(identity, region, clientId, internalUrl, identityProvider)
let! homeDocument = queueingService.GetHomeAsync(CancellationToken.None) |> Async.AwaitTask
The following code shows demonstrates the same example using the
Task Parallel Library
instead of the / operators.
IQueueingService queueingService = new CloudQueuesProvider(identity, region, clientId, internalUrl, identityProvider);
Task<HomeDocument> task = queueingService.GetHomeAsync(CancellationToken.None);
Dim queueingService As IQueueingService = New CloudQueuesProvider(identity, region, clientId, internalUrl, identityProvider)
Dim task = queueingService.GetHomeAsync(CancellationToken.None)
IQueueingService^ queueingService = gcnew CloudQueuesProvider(identity, region, clientId, internalUrl, identityProvider);
Task<HomeDocument^>^ task = queueingService->GetHomeAsync(CancellationToken::None);
let queueingService = new CloudQueuesProvider(identity, region, clientId, internalUrl, identityProvider)
let task = queueingService.GetHomeAsync(CancellationToken.None)
Version Information.NET Framework
Supported in: 4.5
openstack.net
Supported in: 1.6, 1.5, 1.4, 1.3.6
See Also