Example #1
0
    public static void Write(Compilation compilation, Module module, CompilerParameters options) {
      XmlTextWriter writer = new XmlTextWriter(module.Name + ".source.xml", Encoding.Default);

      SourceContextWriter scw = new SourceContextWriter(writer);

      writer.WriteStartDocument();
      writer.WriteStartElement("Module");
      writer.WriteAttributeString("name", module.Name);

      scw.VisitCompilation(compilation);

      writer.WriteEndElement(); // Module
      writer.WriteEndDocument();
      writer.Flush();
      writer.Close();
    }
Example #2
0
        public static void Write(Compilation compilation, Module module, CompilerParameters options)
        {
            XmlTextWriter writer = new XmlTextWriter(module.Name + ".source.xml", Encoding.Default);

            SourceContextWriter scw = new SourceContextWriter(writer);

            writer.WriteStartDocument();
            writer.WriteStartElement("Module");
            writer.WriteAttributeString("name", module.Name);

            scw.VisitCompilation(compilation);

            writer.WriteEndElement(); // Module
            writer.WriteEndDocument();
            writer.Flush();
            writer.Close();
        }