コード例 #1
0
        public override void Dispose()
        {
            if (_disposed)
            {
                return;
            }

            _disposed = true;

            if (_transaction != null)
            {
                _transaction.Dispose();
                _transaction = null;
            }

            _activeDbContexts.Values.ForEach(dbContext =>
            {
                dbContext.Dispose();
                IocHelper.Release(dbContext);
            });

            _activeDbContexts.Clear();
        }
コード例 #2
0
 /// <summary>
 /// Releases handler object using Ioc container.
 /// </summary>
 /// <param name="handler">Handler to be released</param>
 public void ReleaseHandler(IEventHandler handler)
 {
     IocHelper.Release(handler);
 }