Пример #1
0
        public IComponent Register <TContract, TImplementation>() where TImplementation : TContract
        {
            var component = new ComponentFacade(typeof(TContract), typeof(TImplementation));

            actions.Add((p) =>
            {
                p.Add(typeof(TContract), component.CreateComponent(dependent));
            });
            return(component);
        }
Пример #2
0
        public IComponent Register <T>()
        {
            var component = new ComponentFacade(typeof(T));

            actions.Add((p) =>
            {
                p.Add(typeof(T), component.CreateComponent(dependent));
            });
            return(component);
        }