Esempio n. 1
0
        public override void Register(Type serviceType, Func <object> activator)
        {
            ComponentRegistration <object> component = Component
                                                       .For(serviceType)
                                                       .UsingFactoryMethod(activator, true);

            if (kernel == null) // SignalR invokes this method in the base constructor, before our constructor is executed.
            {
                deferredRegistrations.Add(component);
            }
            else
            {
                kernel.Register(component.OverridesExistingRegistration());
            }
        }