Esempio n. 1
0
        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.");
            }
        }
Esempio n. 2
0
        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;
            }
        }