public void Enqueue <T>(T command, DateTime datetime) where T : class, ICommand { var envelope = new CommandEnvelope { Command = command }; _serviceBus.DelaySend(datetime, envelope); }
public void Enqueue <T>(T command) where T : class, ICommand { var envelope = new CommandEnvelope { Command = command }; _bus.Send(envelope); }
public void Enqueue <T>(T command, TimeSpan delay) where T : class, ICommand { var envelope = new CommandEnvelope { Command = command }; DateTime deliveryTime = DateTime.Now.Add(delay); _serviceBus.DelaySend(deliveryTime, envelope); }