Пример #1
0
        public IDisposable BeginScope()
        {
            var scope = new LifestyleScope();

            GetCurrentScopes().Push(scope);
            return(new EndScope(this, scope));
        }
Пример #2
0
		private void EndCurrentScope(LifestyleScope scope)
		{
			var scopes = GetCurrentScopes();

			if (scopes.Peek() != scope)
			{
				throw new InvalidOperationException(
					"The scope is not current.  Did you forget to end a child scope?");
			}

			scope.Dispose();
			scopes.Pop();
		}
Пример #3
0
        private void EndCurrentScope(LifestyleScope scope)
        {
            var scopes = GetCurrentScopes();

            if (scopes.Peek() != scope)
            {
                throw new InvalidOperationException(
                          "The scope is not current.  Did you forget to end a child scope?");
            }

            scope.Dispose();
            scopes.Pop();
        }
Пример #4
0
			public EndScope(ScopeSubsystem manager, LifestyleScope scope)
			{
				_manager = manager;
				_scope = scope;
			}
Пример #5
0
		public IDisposable BeginScope()
		{
			var scope = new LifestyleScope();
			GetCurrentScopes().Push(scope);
			return new EndScope(this, scope);
		}
Пример #6
0
 public EndScope(ScopeSubsystem manager, LifestyleScope scope)
 {
     _manager = manager;
     _scope   = scope;
 }