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); }
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); }
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) { 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)); }
public ViewLocations GetLocations() { var locations = new ViewLocations() { ViewLocationFormats = new string[] { RouteConstants.InternalModuleResourcePathPrefix + "{1}/mvc/views/{0}.cshtml" }, PartialViewLocationFormats = new string[] { RouteConstants.InternalModuleResourcePathPrefix + "{1}/mvc/views/partials/{0}.cshtml" } }; return(locations); }
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 ViewLocations GetLocations() { // Register paths as partial views so that the standard view locator can find them. var pathsToRegister = _pageModuleViewLocationRegistrations .SelectMany(r => r.GetPathPrefixes()) .Select(p => FormatViewPath(p)) .Where(p => p != null) .ToArray(); var locations = new ViewLocations() { PartialViewLocationFormats = pathsToRegister }; return(locations); }
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); }
public override async Task Generate(RestApiSpec spec, ProgressBar progressBar) { // 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); 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)); }
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); }