Beispiel #1
0
        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);
        }
Beispiel #2
0
 public KDiagnosis(DiagnosisSession session)
 {
     this.session = session;
 }