Exemple #1
0
        private async Task Terminate()
        {
            foreach (var subscription in Subscriptions)
            {
                await Subscriptions.UnsubscribeAsync(subscription.Id);
            }

            await TransportReader.Complete();
        }
Exemple #2
0
    public async Task Terminate()
    {
        foreach (var subscription in Subscriptions)
        {
            await Subscriptions.UnsubscribeAsync(subscription.Id).ConfigureAwait(false);
        }

        // this should propagate to handler completion
        await TransportReader.Complete().ConfigureAwait(false);
    }
Exemple #3
0
    private void LinkToTransportReader()
    {
        _logger.LogDebug("Creating reader pipeline");
        TransportReader = Transport.Reader;
        _handler        = new ActionBlock <OperationMessage>(HandleMessageAsync, new ExecutionDataflowBlockOptions
        {
            EnsureOrdered   = true,
            BoundedCapacity = 1
        });

        TransportReader.LinkTo(_handler);
        _logger.LogDebug("Reader pipeline created");
    }