public async Task Send <T>(T command, string queueName = "") where T : class { BusControl = BusControl ?? BuildBus(); if (queueName == string.Empty) { queueName = command.GetType().Assembly.GetName().Name + "_CoolBus"; } var sendToUri = new Uri($"rabbitmq://{RabbitConfig.HostName}:{RabbitConfig.Port}/{queueName}"); var endPoint = await BusControl.GetSendEndpoint(sendToUri); await endPoint.Send(command); }
public async Task <ISendEndpoint> GetSendEndpoint(Uri address) { return(await BusControl.GetSendEndpoint(address).ConfigureAwait(false)); }