public void UnregisterService(AService Service) { var t = Service.GetType(); if (this._register.ContainsKey(t)) { this._register.Remove(t); } else { throw new Exception("Service for type " + t + " not registered."); } }
public void RegisterService(AService Service) { var t = Service.GetType(); if (this._register.ContainsKey(t)) { throw new Exception("Service for type " + t + " already registered."); } else { this._register[t] = Service; } }