Esempio n. 1
0
        public void UnregisterModel(AModel model)
        {
            var t = model.GetType();

            if (this._register.ContainsKey(t))
            {
                this._register.Remove(t);
            }
            else
            {
                throw new Exception("Model for type " + t + " not registered.");
            }
        }
Esempio n. 2
0
        public void RegisterModel(AModel model)
        {
            var t = model.GetType();

            if (this._register.ContainsKey(t))
            {
                throw new Exception("Model for type " + t + " already registered.");
            }
            else
            {
                this._register[t] = model;
            }
        }