Пример #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);
        }