private static async Task MsMqSend(SimulationUnit unit) { using (var queue = new MessageQueue(unit.TargetEndpoint)) { Message msg = new Message { Body = unit.GeneratedBody, Formatter = new BinaryMessageFormatter() }; queue.Send(msg); } }
private static async Task<HttpResponseMessage> HttpSend(SimulationUnit unit) { var client = new HttpClient(); return await client.PostAsync(unit.TargetEndpoint, new StringContent(unit.GeneratedBody, Encoding.ASCII, unit.MimeType)); }
private static async Task <HttpResponseMessage> HttpSend(SimulationUnit unit) { var client = new HttpClient(); return(await client.PostAsync(unit.TargetEndpoint, new StringContent(unit.GeneratedBody, Encoding.ASCII, unit.MimeType))); }