Пример #1
0
        public static ConfiguredInstance SetLifeStyle(this ConfiguredInstance registration, LifetimeScope lifeTimeKey)
        {
            switch (lifeTimeKey)
            {
            case LifetimeScope.Unowned:
                return(registration.Transient());

            case LifetimeScope.Singleton:
                return(registration.Singleton());

            case LifetimeScope.PerHttpRequest:
                return(registration.Transient());

            case LifetimeScope.PerThread:
                return(registration.Transient());

            default:
                return(registration.Transient());
            }
        }