public override async Task Generate(RestApiSpec spec, ProgressBar progressBar) { var view = ViewLocations.LowLevel("Client", "Interface", "IElasticLowLevelClient.cshtml"); var target = GeneratorLocations.LowLevel("IElasticLowLevelClient.Generated.cs"); await DoRazor(spec, view, target); }
public override async Task Generate(RestApiSpec spec, ProgressBar progressBar, CancellationToken token) { var view = ViewLocations.LowLevel("Enums.Generated.cshtml"); var target = GeneratorLocations.LowLevel("Api", "Enums.Generated.cs"); await DoRazor(spec, view, target, null, token); }
public override async Task Generate(RestApiSpec spec, ProgressBar progressBar) { var view = ViewLocations.LowLevel("RequestParameters", "RequestParameters.cshtml"); string Target(string id) => GeneratorLocations.LowLevel("Api", "RequestParameters", $"RequestParameters.{id}.cs"); var namespaced = spec.EndpointsPerNamespaceHighLevel.ToList(); await DoRazorDependantFiles(progressBar, namespaced, view, kv => kv.Key, id => Target(id)); }
public override async Task Generate(RestApiSpec spec, ProgressBar progressBar) { var view = ViewLocations.LowLevel("Client", "Implementation", "ElasticLowLevelClient.cshtml"); var target = GeneratorLocations.LowLevel($"ElasticLowLevelClient.{CsharpNames.RootNamespace}.cs"); await DoRazor(spec, view, target); var namespaced = spec.EndpointsPerNamespaceHighLevel.Where(kv => kv.Key != CsharpNames.RootNamespace).ToList(); var namespacedView = ViewLocations.LowLevel("Client", "Implementation", "ElasticLowLevelClient.Namespace.cshtml"); await DoRazorDependantFiles(progressBar, namespaced, namespacedView, kv => kv.Key, id => GeneratorLocations.LowLevel($"ElasticLowLevelClient.{id}.cs")); }
public override async Task Generate(RestApiSpec spec, ProgressBar progressBar) { // Delete existing files foreach (var file in Directory.GetFiles(GeneratorLocations.EsNetFolder, "RequestParameters.*.cs")) { File.Delete(file); } var view = ViewLocations.LowLevel("RequestParameters", "RequestParameters.cshtml"); string Target(string id) => GeneratorLocations.LowLevel("Api", "RequestParameters", $"RequestParameters.{id}.cs"); var namespaced = spec.EndpointsPerNamespaceLowLevel.ToList(); await DoRazorDependantFiles(progressBar, namespaced, view, kv => kv.Key, id => Target(id)); }
public override async Task Generate(RestApiSpec spec, ProgressBar progressBar, CancellationToken token) { // Delete existing files foreach (var file in Directory.GetFiles(GeneratorLocations.EsNetFolder, "ElasticLowLevelClient.*.cs")) { File.Delete(file); } var view = ViewLocations.LowLevel("Client", "Implementation", "ElasticLowLevelClient.cshtml"); var target = GeneratorLocations.LowLevel($"ElasticLowLevelClient.{CsharpNames.RootNamespace}.cs"); await DoRazor(spec, view, target, null, token); var namespaced = spec.EndpointsPerNamespaceLowLevel.Where(kv => kv.Key != CsharpNames.RootNamespace).ToList(); var namespacedView = ViewLocations.LowLevel("Client", "Implementation", "ElasticLowLevelClient.Namespace.cshtml"); await DoRazorDependantFiles(progressBar, namespaced, namespacedView, kv => kv.Key, id => GeneratorLocations.LowLevel($"ElasticLowLevelClient.{id}.cs"), token); }