/* * Recursive map printer for displaying a map to the user. */ public static string dumpMap(IMapContainer m, int indent) { string pad = getSpaces(indent); string ret = pad + "(Dumping map)\n"; KeyValuePair <string, ISDTField> e; while ((e = m.GetNext()).Key != null) { ret += pad + string.Format("{0} : [Type={1}, Val={2}]\n", e.Key, e.Value.Type, e.Value.Value); if (e.Value.Type == SDTFieldType.MAP) { ret += dumpMap((IMapContainer)e.Value.Value, indent + 4); } else if (e.Value.Type == SDTFieldType.STREAM) { ret += dumpStream((IStreamContainer)e.Value.Value, indent + 4); } } m.Rewind(); return(ret); }