예제 #1
0
 /// <summary>
 /// Checks availability and correctness of a name for an Api Management
 /// service.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.ApiManagement.IResourceProviderOperations.
 /// </param>
 /// <param name='parameters'>
 /// Required. Parameters supplied to the CheckNameAvailability
 /// operation.
 /// </param>
 /// <returns>
 /// Response of the CheckNameAvailability operation.
 /// </returns>
 public static Task <ApiServiceNameAvailabilityResponse> CheckNameAvailabilityAsync(this IResourceProviderOperations operations, ApiServiceCheckNameAvailabilityParameters parameters)
 {
     return(operations.CheckNameAvailabilityAsync(parameters, CancellationToken.None));
 }
예제 #2
0
 /// <summary>
 /// Checks availability and correctness of a name for an Api Management
 /// service.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.ApiManagement.IResourceProviderOperations.
 /// </param>
 /// <param name='parameters'>
 /// Required. Parameters supplied to the CheckNameAvailability
 /// operation.
 /// </param>
 /// <returns>
 /// Response of the CheckNameAvailability operation.
 /// </returns>
 public static ApiServiceNameAvailabilityResponse CheckNameAvailability(this IResourceProviderOperations operations, ApiServiceCheckNameAvailabilityParameters parameters)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IResourceProviderOperations)s).CheckNameAvailabilityAsync(parameters);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }