예제 #1
0
        public void RemoveInfluenceRule(Guid id)
        {
            var exchange = InfluenceRules.Find(se => se.Id == id);

            if (exchange != null)
            {
                InfluenceRules.Remove(exchange);
            }
        }
예제 #2
0
        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);
        }
예제 #3
0
 public void RemoveInflluenceRule(InfluenceRule cond)
 {
     InfluenceRules.Remove(cond);
 }
예제 #4
0
 public void AddInfluenceRule(InfluenceRule cond)
 {
     InfluenceRules.Add(cond);
 }