/// <summary>
 /// Updates a setting.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.WebSitesExtensions.ISettingsOperations.
 /// </param>
 /// <param name='parameters'>
 /// The setting value.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static OperationResponse Update(this ISettingsOperations operations, SettingsUpdateParameters parameters)
 {
     try
     {
         return(operations.UpdateAsync(parameters).Result);
     }
     catch (AggregateException ex)
     {
         if (ex.InnerExceptions.Count > 1)
         {
             throw;
         }
         else
         {
             throw ex.InnerException;
         }
     }
 }
 /// <summary>
 /// updating settings about different configurations in security center
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='settingName'>
 /// The name of the setting. Possible values include: 'MCAS', 'WDATP',
 /// 'WDATP_EXCLUDE_LINUX_PUBLIC_PREVIEW', 'Sentinel'
 /// </param>
 /// <param name='setting'>
 /// Setting object
 /// </param>
 public static Setting Update(this ISettingsOperations operations, string settingName, Setting setting)
 {
     return(operations.UpdateAsync(settingName, setting).GetAwaiter().GetResult());
 }
示例#3
0
 /// <summary>
 /// Updates a setting.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.WebSitesExtensions.ISettingsOperations.
 /// </param>
 /// <param name='parameters'>
 /// Required. The setting value.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static Task <AzureOperationResponse> UpdateAsync(this ISettingsOperations operations, SettingsUpdateParameters parameters)
 {
     return(operations.UpdateAsync(parameters, CancellationToken.None));
 }