/// <summary>
 /// Checks the availability of the given service namespace across all Windows
 /// Azure subscriptions. This is useful because the domain name is created
 /// based on the service namespace name.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='parameters'>
 /// The namespace name.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <CheckAvailabilityResource> CheckAvailabilityAsync(this INamespacesOperations operations, CheckAvailabilityParameters parameters, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CheckAvailabilityWithHttpMessagesAsync(parameters, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Checks the availability of the given notificationHub in a namespace.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='namespaceName'>
 /// The namespace name.
 /// </param>
 /// <param name='parameters'>
 /// The notificationHub name.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <CheckAvailabilityResult> CheckNotificationHubAvailabilityAsync(this INotificationHubsOperations operations, string resourceGroupName, string namespaceName, CheckAvailabilityParameters parameters, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CheckNotificationHubAvailabilityWithHttpMessagesAsync(resourceGroupName, namespaceName, parameters, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Checks the availability of the given service namespace across all Windows
 /// Azure subscriptions. This is useful because the domain name is created
 /// based on the service namespace name.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='parameters'>
 /// The namespace name.
 /// </param>
 public static CheckAvailabilityResource CheckAvailability(this INamespacesOperations operations, CheckAvailabilityParameters parameters)
 {
     return(Task.Factory.StartNew(s => ((INamespacesOperations)s).CheckAvailabilityAsync(parameters), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 /// <summary>
 /// Checks the availability of the given notificationHub in a namespace.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group.
 /// </param>
 /// <param name='namespaceName'>
 /// The namespace name.
 /// </param>
 /// <param name='parameters'>
 /// The notificationHub name.
 /// </param>
 public static CheckAvailabilityResult CheckNotificationHubAvailability(this INotificationHubsOperations operations, string resourceGroupName, string namespaceName, CheckAvailabilityParameters parameters)
 {
     return(operations.CheckNotificationHubAvailabilityAsync(resourceGroupName, namespaceName, parameters).GetAwaiter().GetResult());
 }
Esempio n. 5
0
 /// <summary>
 /// Checks the availability of the given notificationHub in a
 /// namespace.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/jj870968.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.NotificationHubs.INotificationHubOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group.
 /// </param>
 /// <param name='namespaceName'>
 /// Required. The namespace name.
 /// </param>
 /// <param name='parameters'>
 /// Required. The notificationHub name.
 /// </param>
 /// <returns>
 /// Response of the Check NameAvailability operation.
 /// </returns>
 public static Task <CheckAvailabilityResponse> CheckAvailabilityAsync(this INotificationHubOperations operations, string resourceGroupName, string namespaceName, CheckAvailabilityParameters parameters)
 {
     return(operations.CheckAvailabilityAsync(resourceGroupName, namespaceName, parameters, CancellationToken.None));
 }
Esempio n. 6
0
 /// <summary>
 /// Checks the availability of the given notificationHub in a
 /// namespace.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/jj870968.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.NotificationHubs.INotificationHubOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group.
 /// </param>
 /// <param name='namespaceName'>
 /// Required. The namespace name.
 /// </param>
 /// <param name='parameters'>
 /// Required. The notificationHub name.
 /// </param>
 /// <returns>
 /// Response of the Check NameAvailability operation.
 /// </returns>
 public static CheckAvailabilityResponse CheckAvailability(this INotificationHubOperations operations, string resourceGroupName, string namespaceName, CheckAvailabilityParameters parameters)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((INotificationHubOperations)s).CheckAvailabilityAsync(resourceGroupName, namespaceName, parameters);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
Esempio n. 7
0
 /// <summary>
 /// Checks the availability of the given service namespace across all Azure
 /// subscriptions. This is useful because the domain name is created based on
 /// the service namespace name.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='parameters'>
 /// The namespace name.
 /// </param>
 public static CheckAvailabilityResult CheckAvailability(this INamespacesOperations operations, CheckAvailabilityParameters parameters)
 {
     return(operations.CheckAvailabilityAsync(parameters).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Checks the availability of the given service namespace across all
 /// Windows Azure subscriptions. This is useful because the domain
 /// name is created based on the service namespace name.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/jj870968.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.NotificationHubs.INamespaceOperations.
 /// </param>
 /// <param name='parameters'>
 /// Required. The namespace name.
 /// </param>
 /// <returns>
 /// Response of the Check NameAvailability operation.
 /// </returns>
 public static Task <CheckAvailabilityResponse> CheckAvailabilityAsync(this INamespaceOperations operations, CheckAvailabilityParameters parameters)
 {
     return(operations.CheckAvailabilityAsync(parameters, CancellationToken.None));
 }