Ejemplo n.º 1
0
 public virtual void ExchangeDelete(C context, ExchangeDelete mystruct)
 {
 }
Ejemplo n.º 2
0
 public ValueTask ExchangeDeleteAsync(ExchangeDelete exchange)
 {
     return(Session.ExchangeDeleteAsync(this, exchange));
 }
        public static async ValueTask ExchangeDeleteAsync(this RabbitMQSession session, RabbitMQChannel channel, ExchangeDelete exchange)
        {
            session.Channels.TryGetValue(channel.ChannelId, out var src);
            var data = session.GetChannelData(channel.ChannelId);

            if (exchange.NoWait)
            {
                await session.Writer.SendExchangeDeleteAsync(channel.ChannelId, exchange).ConfigureAwait(false);

                data.Exchanges.Remove(exchange.Name);
                return;
            }
            src.CommonTcs = new TaskCompletionSource <int>(TaskCreationOptions.RunContinuationsAsynchronously);
            await session.Writer.SendExchangeDeleteAsync(channel.ChannelId, exchange).ConfigureAwait(false);

            await src.CommonTcs.Task.ConfigureAwait(false);

            data.Exchanges.Remove(exchange.Name);
        }