Ejemplo n.º 1
0
        public IDisposable BeginScope()
        {
            var scope = new LifestyleScope();

            GetCurrentScopes().Push(scope);
            return(new EndScope(this, scope));
        }
Ejemplo n.º 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();
		}
Ejemplo n.º 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();
        }
Ejemplo n.º 4
0
			public EndScope(ScopeSubsystem manager, LifestyleScope scope)
			{
				_manager = manager;
				_scope = scope;
			}
Ejemplo n.º 5
0
		public IDisposable BeginScope()
		{
			var scope = new LifestyleScope();
			GetCurrentScopes().Push(scope);
			return new EndScope(this, scope);
		}
Ejemplo n.º 6
0
 public EndScope(ScopeSubsystem manager, LifestyleScope scope)
 {
     _manager = manager;
     _scope   = scope;
 }