Inheritance: BaseGeneratorBase
 void ExecuteExampleGenerator(BaseGenerator generator, string fileName, string subNamespace = null)
 {
     generator.Config = this.Configuration;
     var text = generator.TransformText();
     var outputSubFolder = @"docgenerator\AWSSDKDocSamples";
     if (subNamespace != null)
         outputSubFolder = Path.Combine(outputSubFolder, subNamespace);
     WriteFile(Path.GetFullPath(TestFilesRoot + @"\..\..\"), outputSubFolder, fileName, text);
 }
 /// <summary>
 /// Runs the generator and saves the content in the test directory.
 /// </summary>
 /// <param name="generator">The generator to use for outputting the text of the cs file</param>
 /// <param name="fileName">The name of the cs file</param>
 /// <param name="subNamespace">Adds an additional directory for the namespace</param>
 void ExecuteCustomizationTestGenerator(BaseGenerator generator, string fileName, string subNamespace = null)
 {
     generator.Config = this.Configuration;
     var text = generator.TransformText();
     var outputSubFolder = subNamespace == null ? CustomizationTestsSubFolder : Path.Combine(CustomizationTestsSubFolder, subNamespace);
     WriteFile(TestFilesRoot, outputSubFolder, fileName, text);
 }
 /// <summary>
 /// Runs the generator and saves the content into _mobile directory under the generated files root.
 /// </summary>
 /// <param name="generator">The generator to use for outputting the text of the cs file</param>
 /// <param name="fileName">The name of the cs file</param>
 /// <param name="subNamespace">Adds an additional directory for the namespace</param>
 void ExecuteGeneratorMobile(BaseGenerator generator, string fileName, string subNamespace = null)
 {
     generator.Config = this.Configuration;
     var text = generator.TransformText();
     WriteFile(GeneratedFilesRoot, subNamespace, fileName, text);
 }
Beispiel #4
0
        /// <summary>
        /// Runs the generator and saves the content into _bcl35 directory under the generated files root.
        /// </summary>
        /// <param name="generator">The generator to use for outputting the text of the cs file</param>
        /// <param name="fileName">The name of the cs file</param>
        /// <param name="subNamespace">Adds an additional directory for the namespace</param>
        void ExecuteGenerator(BaseGenerator generator, string fileName, string subNamespace = null)
        {
            generator.Config = this.Configuration;
            var text = generator.TransformText();

            string outputFile;
            WriteFile(GeneratedFilesRoot, subNamespace, fileName, text, true, true, out outputFile);
            FilesWrittenToGeneratorFolder.Add(outputFile);
        }
 /// <summary>
 /// Runs the generator and saves the content in the test directory.
 /// </summary>
 /// <param name="generator">The generator to use for outputting the text of the cs file</param>
 /// <param name="fileName">The name of the cs file</param>
 /// <param name="subNamespace">Adds an additional directory for the namespace</param>
 void ExecuteTestGenerator(BaseGenerator generator, string fileName, string subNamespace = null)
 {
     generator.Config = this.config;
     var text = generator.TransformText();
     WriteFile("Marshalling", null, fileName, text, this.testDirectory);
 }
 /// <summary>
 /// Runs the generator and saves the content into WINRT directory.
 /// </summary>
 /// <param name="generator">The generator to use for outputting the text of the cs file</param>
 /// <param name="fileName">The name of the cs file</param>
 /// <param name="subNamespace">Adds an additional directory for the namespace</param>
 void ExecuteGeneratorRT(BaseGenerator generator, string fileName, string subNamespace = null)
 {
     generator.Config = this.config;
     var text = generator.TransformText();
     WriteFile(config.Namespace, subNamespace, fileName, text, this.outputDirectoryRT);
 }
 /// <summary>
 /// Runs the generator and saves the content in the test directory.
 /// </summary>
 /// <param name="generator">The generator to use for outputting the text of the cs file</param>
 /// <param name="fileName">The name of the cs file</param>
 /// <param name="subNamespace">Adds an additional directory for the namespace</param>
 void ExecuteCustomizationTestGenerator(BaseGenerator generator, string fileName, string subNamespace = null)
 {
     generator.Config = this.config;
     var text = generator.TransformText();
     WriteFile("Customizations", subNamespace, fileName, text, this.testDirectory);
 }