コード例 #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;
 }