コード例 #1
0
        protected override Registration CreateRegistrationCore <TService, TImplementation>(Container container)
        {
            TryEnableTransientDisposalOrThrow(container);

            var registration =
                new DisposableTransientLifestyleRegistration <TService, TImplementation>(this, container);

            registration.ScopedLifestyle = this.scopedLifestyle;

            return(registration);
        }
コード例 #2
0
        protected override Registration CreateRegistrationCore <TService>(Func <TService> instanceCreator,
                                                                          Container container)
        {
            TryEnableTransientDisposalOrThrow(container);

            var registration =
                new DisposableTransientLifestyleRegistration <TService>(this, container, instanceCreator);

            registration.ScopedLifestyle = this.scopedLifestyle;

            return(registration);
        }