Beispiel #1
0
 private void Add(Desktop desktop)
 {
     Desktops.Add(desktop);
     if (DesktopsByName.ContainsKey(desktop.Id))
     {
         Desktops.Remove(DesktopsByName[desktop.Id]);
     }
     DesktopsByName[desktop.Id] = desktop;
 }
Beispiel #2
0
        public Task <IDesktop> GetById(string id)
        {
            IDesktop desktop = null;

            if (DesktopsByName.ContainsKey(id))
            {
                desktop = DesktopsByName[id];
            }
            return(Task.FromResult(desktop));
        }