CreateCodeGeneratorOptions() private static method

This is a helper method to create an instance of CodeGeneratorOptions class with desired code generation options.
private static CreateCodeGeneratorOptions ( ) : CodeGeneratorOptions
return System.CodeDom.Compiler.CodeGeneratorOptions
Beispiel #1
0
        /// <summary>
        /// Writes the code to the disk according to the given options.
        /// </summary>
        private void WriteCodeFiles()
        {
            // Ensure the output directory exist in the file system.
            EnsureDirectoryExists(options.OutputLocation);

            // Create the CodeGenerationOptions instance.
            codeGenerationOptions = CodeWriter.CreateCodeGeneratorOptions();

            // Do we have to generate separate files?
            if (options.GenerateSeparateFiles)
            {
                // Write the code into separate files.
                WriteSeparateCodeFiles();
            }
            else
            {
                // Write the code into a singl file.
                WriteSingleCodeFile();
            }

            // Finally write the configuration file.
            if (configuration != null)
            {
                WriteConfigurationFile();
            }
            WriteTextFiles();
        }