Example #1
0
        public static ExtensionContainerScope BeginScope(ExtensionContainerScope parent)
        {
            var scope = new ExtensionContainerScope(parent);

            current.Value = scope;
            return(scope);
        }
Example #2
0
        public IServiceScope CreateScope()
        {
            var scope = ExtensionContainerScope.BeginScope();

            //since WindsorServiceProvider is scoped, this gives us new instance
            var provider = scopeFactoryContainer.Resolve <IServiceProvider>();

            return(new ServiceScope(scope, provider));
        }
Example #3
0
 protected ExtensionContainerScope(ExtensionContainerScope parent)
 {
     scopeCache = new ScopeCache();
     if (parent == null)
     {
         this.parent = ExtensionContainerRootScope.RootScope;
     }
     else
     {
         this.parent = parent;
     }
 }
Example #4
0
 public ForcedScope(ExtensionContainerScope scope)
 {
     previousScope = ExtensionContainerScope.Current;
     ExtensionContainerScope.current.Value = scope;
 }