public void DumpXml(XmlWriter writer) { writer.WriteStartElement("class"); writer.WriteAttributeString("index", Index.ToString()); var instance = Instance; if (instance != null && instance.Name != null) { writer.WriteAttributeString("name", instance.Name.FullName); } writer.WriteElementString("name", Name); if (_initializer != null) { if (AbcDumpService.DumpInitializerCode) { bool old = AbcDumpService.DumpCode; AbcDumpService.DumpCode = true; _initializer.DumpXml(writer, "cinit"); AbcDumpService.DumpCode = old; } else { writer.WriteElementString("cinit", _initializer.ToString()); } } _traits.DumpXml(writer); writer.WriteEndElement(); }
public void DumpXml(XmlWriter writer) { if (!ShouldDump()) { return; } writer.WriteStartElement("script"); writer.WriteAttributeString("index", Index.ToString()); if (_initializer != null) { if (AbcDumpService.DumpInitializerCode) { bool old = AbcDumpService.DumpCode; AbcDumpService.DumpCode = true; _initializer.DumpXml(writer, "init"); AbcDumpService.DumpCode = old; } else { writer.WriteElementString("init", _initializer.ToString()); } } _traits.DumpXml(writer); writer.WriteEndElement(); }
public override string ToString() { if (_method != null) { return(_method.ToString()); } return(base.ToString()); }
public void DumpXml(XmlWriter writer) { if (AbcDumpService.FilterClass(this)) { return; } IsDumped = true; writer.WriteStartElement("instance"); writer.WriteAttributeString("index", Index.ToString()); if (Name != null) { writer.WriteAttributeString("name", Name.FullName); } //if (_superName != null) // writer.WriteAttributeString("supername", _superName.FullName); //if (_name != null) // writer.WriteElementString("name", _name.ToString()); if (BaseTypeName != null) { writer.WriteElementString("super", BaseTypeName.ToString()); } writer.WriteElementString("flags", Flags.ToString()); if ((Flags & AbcClassFlags.ProtectedNamespace) != 0 && ProtectedNamespace != null) { writer.WriteStartElement("protectedNamespace"); writer.WriteAttributeString("name", ProtectedNamespace.Name.Value); writer.WriteAttributeString("kind", ProtectedNamespace.Kind.ToString()); writer.WriteEndElement(); } if (_interfaces.Count > 0) { writer.WriteStartElement("interfaces"); foreach (var i in _interfaces) { writer.WriteStartElement("interface"); writer.WriteAttributeString("name", i.ToString()); writer.WriteEndElement(); } writer.WriteEndElement(); } if (_initializer != null) { if (AbcDumpService.DumpInitializerCode) { bool old = AbcDumpService.DumpCode; AbcDumpService.DumpCode = true; _initializer.DumpXml(writer, "iinit"); AbcDumpService.DumpCode = old; } else { writer.WriteElementString("iinit", _initializer.ToString()); } } _traits.DumpXml(writer); if (_class != null) { _class.DumpXml(writer); } writer.WriteEndElement(); }