public override async Task Generate(RestApiSpec spec, ProgressBar progressBar, CancellationToken token)
        {
            var view   = ViewLocations.HighLevel("Client", "Interface", "IElasticClient.cshtml");
            var target = GeneratorLocations.HighLevel("IElasticClient.Generated.cs");

            await DoRazor(spec, view, target, null, token);
        }
Ejemplo n.º 2
0
        public override async Task Generate(RestApiSpec spec, ProgressBar progressBar)
        {
            var view   = ViewLocations.HighLevel("Requests", "ApiUrlsLookup.cshtml");
            var target = GeneratorLocations.HighLevel("_Generated", "ApiUrlsLookup.generated.cs");

            await DoRazor(spec, view, target);
        }
Ejemplo n.º 3
0
        public override async Task Generate(RestApiSpec spec, ProgressBar progressBar)
        {
            var view   = ViewLocations.HighLevel("Client", "Implementation", "ElasticClient.cshtml");
            var target = GeneratorLocations.HighLevel($"ElasticClient.{CsharpNames.RootNamespace}.cs");

            await DoRazor(spec, view, target);

            string Target(string id) => GeneratorLocations.HighLevel($"ElasticClient.{id}.cs");

            var namespaced    = spec.EndpointsPerNamespace.Where(kv => kv.Key != CsharpNames.RootNamespace).ToList();
            var dependantView = ViewLocations.HighLevel("Client", "Implementation", "ElasticClient.Namespace.cshtml");

            await DoRazorDependantFiles(progressBar, namespaced, dependantView, kv => kv.Key, id => Target(id));
        }
Ejemplo n.º 4
0
        public override async Task Generate(RestApiSpec spec, ProgressBar progressBar)
        {
            var view   = ViewLocations.HighLevel("Requests", "PlainRequestBase.cshtml");
            var target = GeneratorLocations.HighLevel("Requests.cs");

            await DoRazor(spec, view, target);

            var dependantView = ViewLocations.HighLevel("Requests", "Requests.cshtml");

            string Target(string id) => GeneratorLocations.HighLevel($"Requests.{id}.cs");

            var namespaced = spec.EndpointsPerNamespace.ToList();

            await DoRazorDependantFiles(progressBar, namespaced, dependantView, kv => kv.Key, id => Target(id));
        }
Ejemplo n.º 5
0
        public override async Task Generate(RestApiSpec spec, ProgressBar progressBar, CancellationToken token)
        {
            // Delete existing files
            foreach (var file in Directory.GetFiles(GeneratorLocations.NestFolder, "ElasticClient.*.cs"))
            {
                File.Delete(file);
            }

            var view   = ViewLocations.HighLevel("Client", "Implementation", "ElasticClient.cshtml");
            var target = GeneratorLocations.HighLevel($"ElasticClient.{CsharpNames.RootNamespace}.cs");

            await DoRazor(spec, view, target, null, token);

            string Target(string id) => GeneratorLocations.HighLevel($"ElasticClient.{id}.cs");

            var namespaced    = spec.EndpointsPerNamespaceHighLevel.Where(kv => kv.Key != CsharpNames.RootNamespace).ToList();
            var dependantView = ViewLocations.HighLevel("Client", "Implementation", "ElasticClient.Namespace.cshtml");

            await DoRazorDependantFiles(progressBar, namespaced, dependantView, kv => kv.Key, id => Target(id), token);
        }
        public override async Task Generate(RestApiSpec spec, ProgressBar progressBar, CancellationToken token)
        {
            // Delete existing files
            foreach (var file in Directory.GetFiles(GeneratorLocations.NestFolder, "Requests.*.cs"))
            {
                File.Delete(file);
            }

            var view   = ViewLocations.HighLevel("Requests", "PlainRequestBase.cshtml");
            var target = GeneratorLocations.HighLevel("Requests.cs");

            await DoRazor(spec, view, target, null, token);

            var dependantView = ViewLocations.HighLevel("Requests", "Requests.cshtml");

            string Target(string id) => GeneratorLocations.HighLevel($"Requests.{id}.cs");

            var namespaced = spec.EndpointsPerNamespaceHighLevel.ToList();

            await DoRazorDependantFiles(progressBar, namespaced, dependantView, kv => kv.Key, id => Target(id), token);
        }