コード例 #1
0
ファイル: LifetimeScopeAccessor.cs プロジェクト: vtml/Windsor
        public void Dispose()
        {
            var scope = Scope.ObtainCurrentScope();

            if (scope != null)
            {
                scope.Dispose();
            }
        }
コード例 #2
0
		public ThreadStaticLifetimeScope(IKernel container)
		{
			var parent = ObtainCurrentScope();
			if (parent != null)
			{
				parentScope = parent;
			}
			SetCurrentScope(this);
		}
コード例 #3
0
ファイル: LifetimeScopeAccessor.cs プロジェクト: vtml/Windsor
        public ILifetimeScope GetScope(CreationContext context)
        {
            var scope = Scope.ObtainCurrentScope();

            if (scope == null)
            {
                throw new InvalidOperationException("Scope was not available. Did you forget to call container.BeginScope()?");
            }
            return(scope);
        }
コード例 #4
0
        public ThreadStaticLifetimeScope(IKernel container)
        {
            var parent = ObtainCurrentScope();

            if (parent != null)
            {
                parentScope = parent;
            }
            SetCurrentScope(this);
        }
コード例 #5
0
		private void SetCurrentScope(ThreadStaticLifetimeScope lifetimeScope)
		{
			currentScope = lifetimeScope;
		}
コード例 #6
0
 private void SetCurrentScope(ThreadStaticLifetimeScope lifetimeScope)
 {
     currentScope = lifetimeScope;
 }