public static MqExchangeFactory ExchangeFactory(MqExchangeType type = MqExchangeType.Direct, bool autoDelete = true) { return(new MqExchangeFactory( type, new MqChannelProvider(new DefaultMqConnectionProvider(MqOptions) )) { AutoDelete = autoDelete }); }
public static string ToLiteral(this MqExchangeType exchangeType) { switch (exchangeType) { case MqExchangeType.Direct: case MqExchangeType.Topic: case MqExchangeType.Fanout: return(exchangeType.ToString("G").ToLower()); case MqExchangeType.Header: return("headers"); default: throw new ArgumentOutOfRangeException(nameof(exchangeType), exchangeType, null); } }
public TestExchangeFactory(MqExchangeType exchangeType) : base(exchangeType, TestMqTools.ChannelProvider) { Prefix = "mylab:mq:test:"; AutoDelete = true; }
/// <summary> /// Initializes a new instance of <see cref="MqQueueFactory"/> /// </summary> public MqExchangeFactory(MqExchangeType exchangeType, IMqChannelProvider channelProvider) { _channelProvider = channelProvider ?? throw new ArgumentNullException(nameof(channelProvider)); ExchangeType = exchangeType; }