Inheritance: ILifetimeScope
Exemple #1
0
            public Endpoint()
            {
                EndpointSetup <DefaultServer>((config, desc) =>
                {
                    var container      = new ContainerBuilder().Build();
                    var scopeDecorator = new ScopeDecorator(container);

                    config.UseContainer <AutofacBuilder>(c => c.ExistingLifetimeScope(scopeDecorator));

                    var context       = (Context)desc.ScenarioContext;
                    context.Decorator = scopeDecorator;
                    context.Scope     = container;
                });
            }
            public Endpoint()
            {
                EndpointSetup<DefaultServer>((config, desc) =>
                {
                    var container = new ContainerBuilder().Build();
                    var scopeDecorator = new ScopeDecorator(container);

                    config.UseContainer<AutofacBuilder>(c => c.ExistingLifetimeScope(scopeDecorator));

                    var context = (Context) desc.ScenarioContext;
                    context.Decorator = scopeDecorator;
                    context.Scope = container;
                });
            }