/// <summary> /// Create the module identified by module name. (see /// http://aka.ms/azureautomationsdk/moduleoperations for more /// information) /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.Automation.IModuleOperations. /// </param> /// <param name='automationAccount'> /// Required. The automation account name. /// </param> /// <param name='parameters'> /// Required. The update parameters for module. /// </param> /// <returns> /// The response model for the get module operation. /// </returns> public static Task<ModuleGetResponse> UpdateAsync(this IModuleOperations operations, string automationAccount, ModuleUpdateParameters parameters) { return operations.UpdateAsync(automationAccount, parameters, CancellationToken.None); }
/// <summary> /// Create the module identified by module name. (see /// http://aka.ms/azureautomationsdk/moduleoperations for more /// information) /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.Automation.IModuleOperations. /// </param> /// <param name='automationAccount'> /// Required. The automation account name. /// </param> /// <param name='parameters'> /// Required. The update parameters for module. /// </param> /// <returns> /// The response model for the get module operation. /// </returns> public static ModuleGetResponse Update(this IModuleOperations operations, string automationAccount, ModuleUpdateParameters parameters) { return Task.Factory.StartNew((object s) => { return ((IModuleOperations)s).UpdateAsync(automationAccount, parameters); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult(); }