GetOutputPath() private method

private GetOutputPath ( ) : string
return string
Example #1
0
        internal static IReadOnlyList<TypeScriptClass> Generate(CommandLineArgumentParser arguments)
        {
            var sourceFileProcessors = SourceFileProcessor.GetSourceFileProcessors(arguments.GetSourcePath(), typeof(GeneratedModel));

            var models = GetModels(sourceFileProcessors);
            if (models.Any())
            {
                FileGenerationHelper.CreateDirectoryIfNecessary(arguments.GetOutputPath(), ModelsDirectoryName);
            }

            RenderClassFiles(arguments.GetOutputPath(), models);

            return models;
        }
Example #2
0
        internal static void CleanOutputDirectory(CommandLineArgumentParser arguments)
        {
            var directory = new DirectoryInfo(arguments.GetOutputPath());
            foreach (var file in directory.GetFiles())
            {
                file.Delete();
            }

            foreach (var subDirectory in directory.GetDirectories())
            {
                subDirectory.Delete(true);
            }
        }