Exemple #1
0
 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);
     }
 }
Exemple #2
0
 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);
     }
 }
Exemple #3
0
 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));
 }
Exemple #4
0
        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)));
        }