virtual public void Map(System.Type type, System.Type mapper, object instance) { DesignByContract.Check.Require(instance != null, "IoC: Trying to register an null instance of type: " + type.FullName); DesignByContract.Check.Require(type.IsAssignableFrom(instance.GetType()), "IoC: Trying to register an invalid instance of type: " + type.FullName); _injectLater.Add(instance); _providers[type] = new StandardProvider(mapper); _uniqueInstances[mapper] = instance; }
virtual public void Register(System.Type type) { _providers[type] = new StandardProvider(type); }
// // IInternalContainer interface // virtual public void Register(System.Type type, System.Type mapper) { DesignByContract.Check.Require(type.IsAssignableFrom(mapper)); _providers[type] = new StandardProvider(mapper); }