public Profile(int internalnumber, string name, string tripcondition, string backcondition) { Id = internalnumber; Name = name; TripCondition = new BaseUtils.ConditionLists(); TripCondition.Read(tripcondition); if (TripCondition.Count == 0) { TripCondition.Read("Condition AlwaysFalse"); } BackCondition = new BaseUtils.ConditionLists(); BackCondition.Read(backcondition); if (BackCondition.Count == 0) { BackCondition.Read("Condition AlwaysFalse"); } }
static public int FindTriggerIndex(ConditionLists trigger, ConditionLists back) { return(Array.FindIndex(StandardTriggers, x => x.TripCondition.Equals(trigger.ToString()) && x.BackCondition.Equals(back.ToString()))); }