Ejemplo n.º 1
0
        private static void WriteCodefileToDisk(ICodeGen engine, CodeCompileUnit emittedInterface, string outputFilePath)
        {
            CodeDomProvider      provider = engine.CreateCodeDomProvider();
            CodeGeneratorOptions options  = new CodeGeneratorOptions();

            options.BracingStyle = "C";
            using (StreamWriter sourceWriter = new StreamWriter(outputFilePath))
            {
                provider.GenerateCodeFromCompileUnit(emittedInterface, sourceWriter, options);
                sourceWriter.Flush();
            }
        }