public Guid AddInfluenceRule(InfluenceRuleDTO dto) { var idx = InfluenceRules.FindIndex(x => x.Id == dto.Id); System.Guid actualID = new Guid(); if (idx < 0) { InfluenceRules.Add(new InfluenceRule(dto)); actualID = dto.Id; } else { InfluenceRules[idx].Rule = new ConditionSet(dto.Rule); InfluenceRules[idx].Value = dto.Value;; InfluenceRules[idx].Id = dto.Id; actualID = InfluenceRules[idx].Id; } return(actualID); }
public void AddInfluenceRule(InfluenceRule cond) { InfluenceRules.Add(cond); }