コード例 #1
0
 /// <summary>
 /// Gets all alert rule templates.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='workspaceName'>
 /// The name of the workspace.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <AlertRuleTemplate> > ListAsync(this IAlertRuleTemplatesOperations operations, string resourceGroupName, string workspaceName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, workspaceName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
コード例 #2
0
 /// <summary>
 /// Gets all alert rule templates.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='nextPageLink'>
 /// The NextLink from the previous successful call to List operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <AlertRuleTemplate> > ListNextAsync(this IAlertRuleTemplatesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
コード例 #3
0
 /// <summary>
 /// Gets the alert rule template.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='workspaceName'>
 /// The name of the workspace.
 /// </param>
 /// <param name='alertRuleTemplateId'>
 /// Alert rule template ID
 /// </param>
 public static AlertRuleTemplate Get(this IAlertRuleTemplatesOperations operations, string resourceGroupName, string workspaceName, string alertRuleTemplateId)
 {
     return(operations.GetAsync(resourceGroupName, workspaceName, alertRuleTemplateId).GetAwaiter().GetResult());
 }
コード例 #4
0
 /// <summary>
 /// Gets all alert rule templates.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='workspaceName'>
 /// The name of the workspace.
 /// </param>
 public static IPage <AlertRuleTemplate> List(this IAlertRuleTemplatesOperations operations, string resourceGroupName, string workspaceName)
 {
     return(operations.ListAsync(resourceGroupName, workspaceName).GetAwaiter().GetResult());
 }
コード例 #5
0
 /// <summary>
 /// Gets all alert rule templates.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='nextPageLink'>
 /// The NextLink from the previous successful call to List operation.
 /// </param>
 public static IPage <AlertRuleTemplate> ListNext(this IAlertRuleTemplatesOperations operations, string nextPageLink)
 {
     return(operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult());
 }