Open GoogleCodeExporter opened 9 years ago
Good point, though its a bit complicated to display all the info in the console
or logfiles... any ideas?
Original comment by apple9...@googlemail.com
on 16 Sep 2011 at 3:17
I didn't find how to call the ToString method of a template (that you could
manually write), but for the printing of the packet name I just do:
Debug.Write("#Bytes OUT: " + tmpMessage.PacketData.ToArray().Length + " ");
Debug.WriteLine("-OUT->" + BitConverter.ToString(tmpMessage.PacketData.ToArray()).Replace("-", " "));
Debug.WriteLine("Class: " + pck.GetType());
...in PacketManager.
Original comment by idemmelg...@gmail.com
on 16 Sep 2011 at 6:31
ToString would require a base class for the templates,
and the following will only work, if GetType() and GetField() support late
binding
<code language="cs">
// ToString within the base class...
foreach (var fld in GetType().GetFields())
{
Debug.WriteLine(fld.Name + ": " + fld.GetValue(this).ToString());
}
</code>
Original comment by apple9...@googlemail.com
on 17 Sep 2011 at 5:23
Partly implemented (i did the same as you, just displayed the packet names)
Original comment by apple9...@googlemail.com
on 19 Oct 2011 at 9:01
Original issue reported on code.google.com by
idemmelg...@gmail.com
on 15 Sep 2011 at 5:25