コード例 #1
0
ファイル: CacheManager.cs プロジェクト: cykjydxs/SmartSql
        private void DbSession_Disposed(object sender, DbSessionEventArgs eventArgs)
        {
            var dbSession = sender as IDbSession;

            if (_sessionMappedExecutionQueue.TryGetValue(dbSession.Id, out var executionQueue))
            {
                _sessionMappedExecutionQueue.TryRemove(dbSession.Id, out var exeQueue);
            }
        }
コード例 #2
0
ファイル: CacheManager.cs プロジェクト: cykjydxs/SmartSql
        private void DbSession_Committed(object sender, DbSessionEventArgs eventArgs)
        {
            var dbSession = sender as IDbSession;

            if (_sessionMappedExecutionQueue.TryGetValue(dbSession.Id, out var executionQueue))
            {
                HandleCacheQueue(executionQueue);
                _sessionMappedExecutionQueue.TryRemove(dbSession.Id, out var exeQueue);
            }
        }
コード例 #3
0
ファイル: CacheManager.cs プロジェクト: cykjydxs/SmartSql
        private void DbSession_Rollbacked(object sender, DbSessionEventArgs eventArgs)
        {
            var dbSession = sender as IDbSession;

            _sessionMappedExecutionQueue.TryRemove(dbSession.Id, out var exeQueue);
        }