Beispiel #1
0
        public async Task <bool> TryAddAsync(ITransaction tx, TKey key, TValue value, TimeSpan timeout, CancellationToken cancellationToken)
        {
            var result = await _dictionary.TryAddAsync(tx, key, value, timeout, cancellationToken).ConfigureAwait(false);

            if (result)
            {
                await OnAddAsync(tx, key, value, timeout, cancellationToken).ConfigureAwait(false);
            }

            return(result);
        }