Example #1
0
 public void Handle(ESBRequest request)
 {
     if (request.Type == ESBRequest._Type.ACTION)
     {
         ReceiveDataRequest(Encoder.DecodeESBDataRequest(request.Data));
     }
     else if (request.Type == ESBRequest._Type.BROADCAST)
     {
         ReceiveBroadcast(Encoder.DecodeBroadcast(request.Data));
     }
 }
Example #2
0
 public static byte[] EncodeESBRequest(ESBRequest node)
 {
     return(Encoding.ASCII.GetBytes(JsonConvert.SerializeObject(node, Formatting.None) + "<EOF>"));
 }