示例#1
0
        void IContainer.Configure(Type concreteComponent, DependencyLifecycle dependencyLifecycle)
        {
            if (initialized)
            {
                throw new InvalidOperationException("You can't alter the registrations after the container components has been resolved from the container");
            }

            typeHandleLookup[concreteComponent] = dependencyLifecycle;

            lock (componentProperties)
                if (!componentProperties.ContainsKey(concreteComponent))
                {
                    componentProperties[concreteComponent] = new ComponentConfig();
                }
        }