public override string ToPrettyString(Direction direction) { if (direction == this.Direction) { IMessage message = null; OSD osd = OSDParser.Deserialize(this.ResponseBytes); OSDMap data = (OSDMap)osd; if (data.ContainsKey("body")) { message = MessageUtils.DecodeEvent(this.Name, (OSDMap)data["body"]); } else { message = MessageUtils.DecodeEvent(this.Name, data); } if (message != null) { return(PacketDecoder.MessageToString(message, 0)); } else { return("No Decoder for " + this.Name + Environment.NewLine + osd.ToString()); } } else { return(String.Empty); } }