public void Disconnected(string connectionId) { RunnerViewModel runner = Runners.Where(r => r.ConnectionId == connectionId).FirstOrDefault(); if (runner != null) { runner.Status = "Disconnected"; RemoveRunner(runner); } }
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); }