// Token: 0x0600002F RID: 47 RVA: 0x00003E38 File Offset: 0x00002038 private static void WriteNode(DTBTreeItem Node, BinaryWriter Output) { Output.Write((int)Node.Type); if (Node is DTBTreeInteger) { DTBTreeInteger dtbtreeInteger = (DTBTreeInteger)Node; Output.Write(dtbtreeInteger.Integer); return; } if (Node is DTBTreeFloat) { DTBTreeFloat dtbtreeFloat = (DTBTreeFloat)Node; Output.Write(dtbtreeFloat.Float); return; } if (Node is DTBTreeString) { DTBTreeString dtbtreeString = (DTBTreeString)Node; byte[] bytes = Encoding.GetEncoding(1252).GetBytes(dtbtreeString.String); Output.Write(bytes.Length); Output.Write(bytes); return; } if (Node is DTBTreeInnerNode) { DTBTreeInnerNode innerNode = (DTBTreeInnerNode)Node; DTBWriter.WriteNodeList(innerNode, Output); return; } throw new DTBException("Internal Error (DTB Writer: Unknown type)."); }
// Token: 0x0600004C RID: 76 RVA: 0x000050A8 File Offset: 0x000032A8 public static void Print(DTBTreeItem Node, TextWriter Output, int TabCount) { for (int i = 0; i < TabCount; i++) { Output.Write("\t"); } if (Node is DTBTreeInteger) { DTBTreeInteger dtbtreeInteger = (DTBTreeInteger)Node; Output.WriteLine("DTBTreeInteger = " + dtbtreeInteger.Integer.ToString()); return; } if (Node is DTBTreeFloat) { DTBTreeFloat dtbtreeFloat = (DTBTreeFloat)Node; Output.WriteLine("DTBTreeFloat = " + dtbtreeFloat.Float.ToString()); return; } if (Node is DTBTreeString) { DTBTreeString dtbtreeString = (DTBTreeString)Node; Output.WriteLine("DTBTreeString = " + dtbtreeString.String.ToString()); return; } if (Node is DTBTreeInnerNode) { DTBTreeInnerNode dtbtreeInnerNode = (DTBTreeInnerNode)Node; Output.WriteLine("DTBTreeInnerNode > Line " + dtbtreeInnerNode.LineNumber.ToString()); using (List <DTBTreeItem> .Enumerator enumerator = dtbtreeInnerNode.SubNodes.GetEnumerator()) { while (enumerator.MoveNext()) { DTBTreeItem node = enumerator.Current; DTBDebugger.Print(node, Output, TabCount + 1); } return; } } throw new DTBException("Internal Error (DTB Debugger: Unknown type)."); }