Ejemplo n.º 1
0
        public async Task StartAsync(CancellationToken cancellationToken)
        {
            await _semaphoreSlim.WaitAsync(cancellationToken);

            try
            {
                if (_messageRunnerSession != null)
                {
                    return;
                }
                _messageRunnerSession = await _messageRunner.Run();
            }
            finally
            {
                _semaphoreSlim.Release();
            }
        }
 public Task <IMessageRunnerSession> Run()
 {
     return(_innerRunner.Run());
 }