/// <summary> /// Set the settings of a triggered WebJob (will replace the current /// settings of the WebJob). /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.WebSitesExtensions.ITriggeredWebJobOperations. /// </param> /// <param name='jobName'> /// Required. The triggered WebJob name. /// </param> /// <param name='settings'> /// Required. The triggered WebJob settings. /// </param> /// <returns> /// A standard service response including an HTTP status code and /// request ID. /// </returns> public static Task <OperationResponse> SetSettingsAsync(this ITriggeredWebJobOperations operations, string jobName, TriggeredWebJobSettingsUpdateParameters settings) { return(operations.SetSettingsAsync(jobName, settings, CancellationToken.None)); }
/// <summary> /// Set the settings of a triggered WebJob (will replace the current /// settings of the WebJob). /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.WebSitesExtensions.ITriggeredWebJobOperations. /// </param> /// <param name='jobName'> /// Required. The triggered WebJob name. /// </param> /// <param name='settings'> /// Required. The triggered WebJob settings. /// </param> /// <returns> /// A standard service response including an HTTP status code and /// request ID. /// </returns> public static OperationResponse SetSettings(this ITriggeredWebJobOperations operations, string jobName, TriggeredWebJobSettingsUpdateParameters settings) { return(Task.Factory.StartNew((object s) => { return ((ITriggeredWebJobOperations)s).SetSettingsAsync(jobName, settings); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }