Beispiel #1
0
        public void deleteserver(string id)
        {
            server p = allserverslist.Where(x => x.ServerId == id).FirstOrDefault();

            if (p == null)
            {
                throw new Exception("id not found ");
            }
            else
            {
                allserverslist.Remove(p);
            }
        }
Beispiel #2
0
        public server getbyid(String id)
        {
            server p = allserverslist.Where(x => x.ServerId == id).FirstOrDefault();

            if (p == null)
            {
                throw new Exception("id not found ");
            }
            else
            {
                return(p);
            }
        }
Beispiel #3
0
 public void AddServer(server s)
 {
     allserverslist.Add(s);
 }