/// <summary> /// Initializes a new instance of the ManagementEventRuleCondition /// class. /// </summary> /// <param name="dataSource">the resource from which the rule collects /// its data. For this type dataSource will always be of type /// RuleManagementEventDataSource.</param> /// <param name="aggregation">How the data that is collected should be /// combined over time and when the alert is activated. Note that for /// management event alerts aggregation is optional – if it is not /// provided then any event will cause the alert to activate.</param> public ManagementEventRuleCondition(RuleDataSource dataSource = default(RuleDataSource), ManagementEventAggregationCondition aggregation = default(ManagementEventAggregationCondition)) { DataSource = dataSource; Aggregation = aggregation; }
/// <summary> /// Initializes a new instance of the PSEventRuleCondition class /// </summary> /// <param name="ruleCondition">The rule condition</param> public PSEventRuleCondition(ManagementEventRuleCondition ruleCondition) { this.DataSource = ruleCondition.DataSource as RuleManagementEventDataSource; this.AggregationCondition = ruleCondition.Aggregation; }