/// <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)); }
/// <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()); }