private StatusResponse MakeResponse(RequestResponse requestBatch)
 {
     try
     {
         Dictionary <string, bool> response = new Dictionary <string, bool>();
         foreach (KeyValuePair <string, string> request in requestBatch.Batch)
         {
             response.Add(request.Key, true);
             Logger.Write(request.Value);
         }
         return(new StatusResponse()
         {
             Status = response
         });
     } catch (Exception e)
     {
         Console.WriteLine(e.ToString());
     }
     return(null);
 }
예제 #2
0
 public static byte[] EncodeRequestResponse(RequestResponse msg)
 {
     return(Encoding.ASCII.GetBytes(JsonConvert.SerializeObject(msg, Formatting.None) + "<EOF>"));
 }