/// <summary> /// Create a job schedule. (see /// http://aka.ms/azureautomationsdk/jobscheduleoperations for more /// information) /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.Automation.IJobScheduleOperations. /// </param> /// <param name='automationAccount'> /// Required. The automation account name. /// </param> /// <param name='parameters'> /// Required. The parameters supplied to the create job schedule /// operation. /// </param> /// <returns> /// The response model for the create job schedule operation. /// </returns> public static JobScheduleCreateResponse Create(this IJobScheduleOperations operations, string automationAccount, JobScheduleCreateParameters parameters) { return Task.Factory.StartNew((object s) => { return ((IJobScheduleOperations)s).CreateAsync(automationAccount, parameters); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); }
/// <summary> /// Create a job schedule. (see /// http://aka.ms/azureautomationsdk/jobscheduleoperations for more /// information) /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.Automation.IJobScheduleOperations. /// </param> /// <param name='automationAccount'> /// Required. The automation account name. /// </param> /// <param name='parameters'> /// Required. The parameters supplied to the create job schedule /// operation. /// </param> /// <returns> /// The response model for the create job schedule operation. /// </returns> public static Task<JobScheduleCreateResponse> CreateAsync(this IJobScheduleOperations operations, string automationAccount, JobScheduleCreateParameters parameters) { return operations.CreateAsync(automationAccount, parameters, CancellationToken.None); }