示例#1
0
        public void RegisterInstance(Type service, object implementation)
        {
            var registration = new ComponentRegistration(service, new CachingActivator(new InstanceActivator(implementation)));

            _registry.Enqueue(registry => registry.Register(registration));
        }
示例#2
0
        public void Register(Type service, Type implementation)
        {
            var registration = new ComponentRegistration(implementation, new ReflectionActivator(implementation), new[] { service });

            _registry.Enqueue(registry => registry.Register(registration));
        }