/// <summary> /// Initializes a new instance of the AlertsClient class. /// </summary> private AlertsClient() : base() { this._incidents = new IncidentOperations(this); this._rules = new RuleOperations(this); this.HttpClient.Timeout = TimeSpan.FromSeconds(300); }
/// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.Monitoring.Alerts.IRuleOperations. /// </param> /// <param name='ruleId'> /// Required. The id of the rule to delete. /// </param> /// <returns> /// A standard service response including an HTTP status code and /// request ID. /// </returns> public static OperationResponse Delete(this IRuleOperations operations, string ruleId) { return(Task.Factory.StartNew((object s) => { return ((IRuleOperations)s).DeleteAsync(ruleId); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.Monitoring.Alerts.IRuleOperations. /// </param> /// <param name='parameters'> /// Required. The rule to create or update. /// </param> /// <returns> /// A standard service response including an HTTP status code and /// request ID. /// </returns> public static OperationResponse CreateOrUpdate(this IRuleOperations operations, RuleCreateOrUpdateParameters parameters) { return(Task.Factory.StartNew((object s) => { return ((IRuleOperations)s).CreateOrUpdateAsync(parameters); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// List the alert rules within a subscription. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.Monitoring.Alerts.IRuleOperations. /// </param> /// <returns> /// The List Rules operation response. /// </returns> public static RuleListResponse List(this IRuleOperations operations) { return(Task.Factory.StartNew((object s) => { return ((IRuleOperations)s).ListAsync(); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
internal RuleState(IRuleRef rule, TokenStreamIndex index, IRuleOperations coroutines, RuleState <TNode>?parent) { Rule = (IRuleRef <TNode>)rule; Result = new CoroutineResult <RuleResult>(); NodeContext = new NodeContext <TNode>(); Parent = parent; RuleContext = new RuleContext(Rule, index, coroutines); Iterator = rule.Grab(RuleContext).GetEnumerator(); }
/// <summary> /// Initializes a new instance of the AlertsClient class. /// </summary> /// <param name='httpClient'> /// The Http client /// </param> private AlertsClient(HttpClient httpClient) : base(httpClient) { this._incidents = new IncidentOperations(this); this._rules = new RuleOperations(this); this._apiVersion = "2013-10-01"; this._longRunningOperationInitialTimeout = -1; this._longRunningOperationRetryTimeout = -1; this.HttpClient.Timeout = TimeSpan.FromSeconds(300); }
/// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.Monitoring.Alerts.IRuleOperations. /// </param> /// <param name='ruleId'> /// The id of the rule to delete. /// </param> /// <returns> /// A standard service response including an HTTP status code and /// request ID. /// </returns> public static OperationResponse Delete(this IRuleOperations operations, string ruleId) { try { return(operations.DeleteAsync(ruleId).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.IRuleOperations. /// </param> /// <param name='parameters'> /// The rule to create or update. /// </param> /// <returns> /// A standard service response including an HTTP status code and /// request ID. /// </returns> public static OperationResponse CreateOrUpdate(this IRuleOperations operations, RuleCreateOrUpdateParameters parameters) { try { return(operations.CreateOrUpdateAsync(parameters).Result); } catch (AggregateException ex) { if (ex.InnerExceptions.Count > 1) { throw; } else { throw ex.InnerException; } } }
/// <summary> /// List the alert rules within a subscription. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.Monitoring.Alerts.IRuleOperations. /// </param> /// <returns> /// The List Rules operation response. /// </returns> public static RuleListResponse List(this IRuleOperations operations) { try { return(operations.ListAsync().Result); } catch (AggregateException ex) { if (ex.InnerExceptions.Count > 1) { throw; } else { throw ex.InnerException; } } }
public LeaveOperations(ILeaveRepository LeaveRepository, IRuleOperations ruleOperations) { _leaveRepository = LeaveRepository; }
/// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.Monitoring.Alerts.IRuleOperations. /// </param> /// <param name='parameters'> /// Required. The rule to create or update. /// </param> /// <returns> /// A standard service response including an HTTP status code and /// request ID. /// </returns> public static Task <OperationResponse> CreateOrUpdateAsync(this IRuleOperations operations, RuleCreateOrUpdateParameters parameters) { return(operations.CreateOrUpdateAsync(parameters, CancellationToken.None)); }
/// <summary> /// List the alert rules within a subscription. /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.Monitoring.Alerts.IRuleOperations. /// </param> /// <returns> /// The List Rules operation response. /// </returns> public static Task <RuleListResponse> ListAsync(this IRuleOperations operations) { return(operations.ListAsync(CancellationToken.None)); }
/// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.Monitoring.Alerts.IRuleOperations. /// </param> /// <param name='ruleId'> /// Required. The id of the rule to retrieve. /// </param> /// <returns> /// The Get Rule operation response. /// </returns> public static Task <RuleGetResponse> GetAsync(this IRuleOperations operations, string ruleId) { return(operations.GetAsync(ruleId, CancellationToken.None)); }
/// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.Monitoring.Alerts.IRuleOperations. /// </param> /// <param name='ruleId'> /// Required. The id of the rule to delete. /// </param> /// <returns> /// A standard service response including an HTTP status code and /// request ID. /// </returns> public static Task <OperationResponse> DeleteAsync(this IRuleOperations operations, string ruleId) { return(operations.DeleteAsync(ruleId, CancellationToken.None)); }
public RuleContext(IRuleRef rule, TokenStreamIndex index, IRuleOperations operations) { _rule = rule; Index = index; _operations = operations; }
public RuleController(IRuleOperations RulesOperation) { _RulesOperation = RulesOperation; }