public static AckMessage Deserialize(string rawMessage)
{
AckMessage msg = new AckMessage();
// '6:::' [message id] '+' [data]
// 6:::4
// 6:::4+["A","B"]
msg.RawMessage = rawMessage;
string[] args = rawMessage.Split(SPLITCHARS, 4);
if (args.Length == 4)
{
msg.Endpoint = args[2];
int id;
string[] parts = args[3].Split(new char[] {'+'});
if (parts.Length > 1)
{
if (int.TryParse(parts[0], out id))
{
msg.AckId = id;
msg.MessageText = parts[1];
Match payloadMatch = reAckComplex.Match(msg.MessageText);
if (payloadMatch.Success)
{
msg.Json = new JsonEncodedEventMessage();
msg.Json.args = new string[] {payloadMatch.Groups["payload"].Value};
}
}
}
}
return msg;
}
public override string Encoded