public void AddCondition([NotNull] RuleEditor.ConditionItem conditionItem) { Assert.ArgumentNotNull(conditionItem, nameof(conditionItem)); if (CurrentRule == null) { return; } var conditionsElement = CurrentRule.Element(@"conditions"); if (conditionsElement == null) { conditionsElement = new XElement(@"conditions"); CurrentRule.Add(conditionsElement); } AddNewConditionElement(conditionsElement, conditionItem); }
public void AddAction([NotNull] RuleEditor.ActionItem actionItem) { Assert.ArgumentNotNull(actionItem, nameof(actionItem)); if (CurrentRule == null) { return; } var actionsElement = CurrentRule.Element(@"actions"); if (actionsElement == null) { actionsElement = new XElement(@"actions"); CurrentRule.Add(actionsElement); } AddNewActionElement(actionsElement, actionItem); }