Castle.MicroKernel.Context.CreationContext.ExitResolutionContext C# (CSharp) Method

ExitResolutionContext() private method

private ExitResolutionContext ( Burden burden, bool trackContext ) : void
burden Burden
trackContext bool
return void
		private void ExitResolutionContext(Burden burden, bool trackContext)
		{
			handlerStack.Pop();

			if (trackContext)
			{
				resolutionStack.Pop();
			}
			if (burden == null)
			{
				return;
			}
			if (burden.Instance == null)
			{
				return;
			}
			if (burden.RequiresPolicyRelease == false)
			{
				return;
			}
			if (resolutionStack.Count != 0)
			{
				var parent = resolutionStack.Peek().Burden;
				if (parent == null)
				{
					return;
				}
				parent.AddChild(burden);
			}
		}

Usage Example

示例#1
0
 public void Dispose()
 {
     context.ExitResolutionContext(burden, trackContext);
 }