예제 #1
0
        public void Disconnected(string connectionId)
        {
            RunnerViewModel runner = Runners.Where(r => r.ConnectionId == connectionId).FirstOrDefault();

            if (runner != null)
            {
                runner.Status = "Disconnected";
                RemoveRunner(runner);
            }
        }
예제 #2
0
        private RunnerViewModel GetRunner(string connectionId)
        {
            RunnerViewModel runner = Runners.Where(r => r.ConnectionId == connectionId).FirstOrDefault();

            if (runner == null)
            {
                runner = new RunnerViewModel()
                {
                    ConnectionId = connectionId
                };
                AddRunner(runner);
            }
            return(runner);
        }