예제 #1
0
파일: Manager.cs 프로젝트: xhute/Kooboo
        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);
        }
예제 #2
0
 public KDiagnosis(DiagnosisSession session)
 {
     this.session = session;
 }