public void SetUp()
        {
            _lifecycle = new ThreadLocalStorageLifecycle();

            container =
                new Container(
                    x =>
                    {
                        x.For<Rule>(InstanceScope.ThreadLocal).Use(
                            () => new ColorRule("Red"));
                    });
        }
        public void SetUp()
        {
            _lifecycle = new ThreadLocalStorageLifecycle();

            container =
                new Container(
                    x =>
                    {
                        x.ForRequestedType<Rule>().CacheBy(InstanceScope.ThreadLocal).TheDefault.Is.ConstructedBy(
                            () => new ColorRule("Red"));
                    });
        }
        public void SetUp()
        {
            lifecycle = new ThreadLocalStorageLifecycle();

            container =
                new Container(
                    x => { x.For<Rule>().HybridHttpOrThreadLocalScoped().Use(() => new ColorRule("Red")); });

            nestedContainer = container.GetNestedContainer();

            var count = 0;
            nestedContainer.Configure(x =>
            {
                x.For<Rule>().Transient().Use("counting", () =>
                {
                    count++;
                    return new ColorRule("Red" + count);
                });
            });
        }
        public void SetUp()
        {
            _lifecycle = new ThreadLocalStorageLifecycle();

            container = new Container(x => x.For<Rule>(Lifecycles.ThreadLocal).Use(() => new ColorRule("Red")));
        }