public void ToStringModelView(int nest, StringBuilder sb)
{
string indent = new string(' ', nest * 4);
sb.AppendLine(indent + "Constants:");
for (int i = 0; i < this.IntConsts.Length; i++)
{
sb.AppendLine(indent + "int #" + i + "\t" + this.IntConsts[i]);
}
for (int i = 0; i < this.UIntConsts.Length; i++)
{
sb.AppendLine(indent + "uint #" + i + "\t" + this.UIntConsts[i]);
}
for (int i = 0; i < this.DoubleConsts.Length; i++)
{
sb.AppendLine(indent + "double #" + i + "\t" + BitConverter.Int64BitsToDouble((long)this.DoubleConsts[i]));
}
for (int i = 0; i < this.StringConsts.Length; i++)
{
sb.AppendLine(indent + "string #" + i + "\t\"" + this.StringConsts[i] + "\"");
}
for (int i = 0; i < this.nsConsts.Count; i++)
{
sb.AppendLine(indent + "ns #" + i + "\t" + this.nsConsts[i]);
}
for (int i = 0; i < this.nsSetConsts.Count; i++)
{
sb.AppendLine(indent + "ns set #" + i + "\t(" + this.nsSetConsts[i].Count + " items)");
foreach (Namespace ns in this.nsSetConsts[i])
{
sb.AppendLine(indent + " - " + ns);
}
}
for (int i = 0; i < this.multinameConsts.Count; i++)
{
Multiname mn = this.multinameConsts[i];
sb.AppendLine(indent + "multiname #" + i + "\t" + mn);
}
sb.AppendLine(indent + "Metadata:");
foreach (string group in this.metadata.Keys)
{
Dictionary<string, string> dict = this.metadata[group];
foreach (string k in dict.Keys)
{
sb.AppendLine(group + "." + k + " = \"" + dict[k] + "\"");
}
}
sb.AppendLine(indent + "End of metadata.");
foreach (AS3ClassDef c in this.Classes)
{
c.ToStringModelView(nest, sb);
}
foreach (Script s in this.Scripts)
{
sb.AppendLine(indent + "Script:");
sb.AppendLine(indent + "{");
s.ToStringModelView(nest + 1, sb);
sb.AppendLine(indent + "}");
}
}