view Implab/Messaging/IConsumer.cs @ 265:74e048cbaac8 v3 v3.0.10

Restored lost JsonXmlCaseTransform from version 2.1
author cin
date Mon, 16 Apr 2018 19:43:18 +0300
parents 7c7e9ad6fe4a
children
line wrap: on
line source

using System.Threading;
using System.Threading.Tasks;

namespace Implab.Messaging {
    public interface IConsumer<T> {
        T Receive(CancellationToken ct);

        Task<T> ReceiveAsync(CancellationToken ct);

        bool TryReceive(out T message);
    }
}