Ejemplo n.º 1
0
 // This removes a registered service
 public void UnregisterService(RemoteService svc)
 {
     if(services.ContainsKey(svc.Name))
         services.Remove(svc.Name);
 }
Ejemplo n.º 2
0
 // This registers a service
 public void RegisterService(RemoteService svc)
 {
     if(!services.ContainsKey(svc.Name))
         services.Add(svc.Name, svc);
     else
         throw new Exception("Service with that name already registered.");
 }