Example #1
0
        public void WriteOutput(string outputFile)
        {
            // Set the module filename data used by debugging.
            ChelaModule module = moduleNode.GetModule();

            module.SetFileName(outputFile);
            module.SetWorkDirectory(System.Environment.CurrentDirectory);

            // Create the output file.
            FileStream output = new FileStream(outputFile, FileMode.Create);

            // Write the module.
            ModuleWriter writer = new ModuleWriter(output);

            Benchmark.Begin();
            module.Write(writer);

            // Close the output file.
            output.Flush();
            output.Close();
            Benchmark.End("Write module");
        }