public ScheduleInput FormScheduleFromARITE(RITE aRite, out bool existed) { ScheduleInput sInput = null; existed = false; HashSet <RITE> riteSet = new HashSet <RITE>() { aRite }; //check if already exists foreach (IScheduleInput schedule in OriginalSchedules) { if (schedule.NumOfRites == 1 && schedule.GetScheduleRITEList().SetEquals(riteSet)) { existed = true; break; } } if (!existed) { string sName = "exploded." + aRite.ExposureID; ScheduleOfRITEs sOfRite = new ScheduleOfRITEs(sName, riteSet, aRite.RiskCharacteristics); sInput = new ScheduleInput(sOfRite); WholeSchedules.Add(sInput); } return(sInput); }
public ScheduleInput FormScheduleFromARITE2(RITE aRite) { string sName = "exploded." + aRite.ExposureID; HashSet <RITE> riteSet = new HashSet <RITE>() { aRite }; ScheduleOfRITEs sOfRite = new ScheduleOfRITEs(sName, riteSet, aRite.RiskCharacteristics); ScheduleInput sInput = new ScheduleInput(sOfRite); return(sInput); }