in netmf/NetMFLite/Fx.cs [43:133]
public static void DebugPrint(bool send, ushort channel, string name, System.Collections.IList fields, params object[] fieldNames)
{
#if TRACE
System.Text.StringBuilder sb = new System.Text.StringBuilder(128);
sb.Append(send ? "SEND" : "RECV");
sb.Append(' ');
sb.Append(name);
sb.Append('(');
if (fields != null)
{
for (int i = 0; i < fields.Count && i < fieldNames.Length; i++)
{
if (i > 0)
{
sb.Append(',');
}
sb.Append(fieldNames[i]);
sb.Append(':');
object value = fields[i];
if (value != null)
{
if (value.GetType() == typeof(Amqp.Types.DescribedValue))
{
value = ((Amqp.Types.DescribedValue)value).Value;
}
var it = value as System.Collections.IEnumerable;
if (it != null)
{
sb.Append('[');
bool first = true;
#if (NANOFRAMEWORK_1_0)
if(it is string)
{
if (!first)
{
sb.Append(',');
}
sb.Append(it);
first = false;
}
else
{
foreach (var o in it)
{
if (!first)
{
sb.Append(',');
}
sb.Append(o);
first = false;
}
}
#else
foreach (var o in it)
{
if (!first)
{
sb.Append(',');
}
sb.Append(o);
first = false;
}
#endif
sb.Append(']');
}
else
{
sb.Append(value);
}
}
}
}
sb.Append(')');
#if (MF_FRAMEWORK_VERSION_V4_2 || MF_FRAMEWORK_VERSION_V4_3 || MF_FRAMEWORK_VERSION_V4_4)
Microsoft.SPOT.Debug.Print(sb.ToString());
#elif (NANOFRAMEWORK_1_0)
Debug.WriteLine(sb.ToString());
#endif
#endif
}