public static Guid StartSession(List <Guid> checkers, RenderContext context) { Guid sessionid = System.Guid.NewGuid(); DiagnosisSession session = new DiagnosisSession(); session.context = context; var allcheckers = ListCheckers(context); List <DiagnosisChecker> selected = new List <DiagnosisChecker>(); foreach (var item in allcheckers) { if (checkers.Contains(item.Id)) { selected.Add(item); } } session.AllCheckers = selected; CheckerTask task = new CheckerTask(); task.Session = session; Thread thread = new Thread(task.Exe); thread.Start(); sessions.Add(sessionid, session); return(sessionid); }
public KDiagnosis(DiagnosisSession session) { this.session = session; }