This class implements the methods that are required to produce the final code out of the CodeDom object graph and write the generated code in to the desired location.
Beispiel #1
0
 /// <summary>
 /// Generates the code using the appropriate code provider and writes it to the 
 /// desired location.
 /// </summary>        
 public static CodeWriterOutput Write(CodeNamespace codeNamespace, Configuration configuration, CodeWriterOptions options, List<TextFile> textFiles, CodeDomProvider provider)
 {
     // Create a new instance of CodeWriter class with given options.
     CodeWriter writer = new CodeWriter(codeNamespace, configuration, options, textFiles, provider);
     // Execute the code writing procedure.
     writer.WriteCodeFiles();
     // Crate an instance of CodeWriterOutput class with the code writer's output.
     CodeWriterOutput output = new CodeWriterOutput(writer.generatedCodeFileNames, writer.configurationFile);
     // Finally return the CodeWriterOutput.
     return output;
 }