/// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.Monitoring.Alerts.IIncidentOperations. /// </param> /// <param name='incidentId'> /// The id of the incident to retrieve. /// </param> /// <returns> /// The Get Incident operation response. /// </returns> public static IncidentGetResponse Get(this IIncidentOperations operations, string incidentId) { try { return(operations.GetAsync(incidentId).Result); } catch (AggregateException ex) { if (ex.InnerExceptions.Count > 1) { throw; } else { throw ex.InnerException; } } }
/// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.Monitoring.Alerts.IIncidentOperations. /// </param> /// <param name='incidentId'> /// The id of the incident to retrieve. /// </param> /// <returns> /// The Get Incident operation response. /// </returns> public static Task <IncidentGetResponse> GetAsync(this IIncidentOperations operations, string incidentId) { return(operations.GetAsync(incidentId, CancellationToken.None)); }