public IServiceScope CreateScope() { var scope = ExtensionContainerScope.BeginScope(ExtensionContainerScope.Current); //since WindsorServiceProvider is scoped, this gives us new instance var provider = scopeFactoryContainer.Resolve <IServiceProvider>(); return(new ServiceScope(scope, provider)); }
internal static ExtensionContainerScopeBase BeginScope() { var scope = new ExtensionContainerScope { RootScope = ExtensionContainerScopeCache.Current.RootScope }; ExtensionContainerScopeCache.Current = scope; return(scope); }
public WindsorScopedServiceProvider(IWindsorContainer container) { this.container = container; this.scope = ExtensionContainerScope.Current; }