Пример #1
0
        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
        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);
        }
        public ThreadStaticLifetimeScope(IKernel container)
        {
            var parent = ObtainCurrentScope();

            if (parent != null)
            {
                parentScope = parent;
            }
            SetCurrentScope(this);
        }
Пример #5
0
		private void SetCurrentScope(ThreadStaticLifetimeScope lifetimeScope)
		{
			currentScope = lifetimeScope;
		}
 private void SetCurrentScope(ThreadStaticLifetimeScope lifetimeScope)
 {
     currentScope = lifetimeScope;
 }