コード例 #1
0
 public void SetUp()
 {
     _fixture = new ModuleTestHarness();
     _fixture.ClearMessages();
     _fixture.Container.Dispose();
     _lifetimeScopeEndingMessage = _fixture.GetSingleMessageOrDefault <LifetimeScopeEndingMessage>();
 }
コード例 #2
0
        public void UpdateFrom(LifetimeScopeEndingMessage message)
        {
            LifetimeScope lifetimeScope;

            if (_lifetimeScopes.TryGetItem(message.LifetimeScopeId, out lifetimeScope))
            {
                if (lifetimeScope.Parent != null)
                {
                    lifetimeScope.Parent.ActiveChildren.Remove(lifetimeScope);
                }

                _lifetimeScopes.RemoveCompleted(lifetimeScope);
            }
        }