/// <summary>
 /// Get diagnostics settings.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.WebSitesExtensions.IRepositoryOperations.
 /// </param>
 /// <returns>
 /// The get diagnostic settings operation response.
 /// </returns>
 public static DiagnosticGetResponse GetSettings(this IRepositoryOperations operations)
 {
     try
     {
         return(operations.GetSettingsAsync().Result);
     }
     catch (AggregateException ex)
     {
         if (ex.InnerExceptions.Count > 1)
         {
             throw;
         }
         else
         {
             throw ex.InnerException;
         }
     }
 }
 /// <summary>
 /// Get diagnostics settings.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.WebSitesExtensions.IRepositoryOperations.
 /// </param>
 /// <returns>
 /// The get diagnostic settings operation response.
 /// </returns>
 public static Task <DiagnosticGetResponse> GetSettingsAsync(this IRepositoryOperations operations)
 {
     return(operations.GetSettingsAsync(CancellationToken.None));
 }