/// <summary> /// Register the Scheduler resource provider with your subscription. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.Scheduler.ISchedulerManagementClient. /// </param> /// <returns> /// A standard service response including an HTTP status code and /// request ID. /// </returns> public static OperationResponse RegisterResourceProvider(this ISchedulerManagementClient operations) { try { return(operations.RegisterResourceProviderAsync().Result); } catch (AggregateException ex) { if (ex.InnerExceptions.Count > 1) { throw; } else { throw ex.InnerException; } } }
/// <summary> /// Register the Scheduler resource provider with your subscription. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.Scheduler.ISchedulerManagementClient. /// </param> /// <returns> /// A standard service response including an HTTP status code and /// request ID. /// </returns> public static Task <OperationResponse> RegisterResourceProviderAsync(this ISchedulerManagementClient operations) { return(operations.RegisterResourceProviderAsync(CancellationToken.None)); }