public IActionResult ShowAllRoutes() { var infos = m_routeAnalyzer.GetAllRouteInformations(); string ret = ""; foreach (var info in infos) { ret += info.ToString() + "\n"; } return(Content(ret)); }
public IActionResult ShowAllRoutes() { var infos = _routeAnalyzer.GetAllRouteInformations(); var builder = new StringBuilder(); foreach (var info in infos) { builder.AppendLine(info.ToString()); } return(Content(builder.ToString())); }
/// <summary> /// 生成Html文件 /// </summary> /// <returns></returns> public async Task Generate() { foreach (var routeInformation in _routeAnalyzer.GetAllRouteInformations()) { // 跳过API的处理 if (routeInformation.Path.StartsWith("/api")) { continue; } await WriteViewToFileAsync(routeInformation); } }
void OnStarted() { var infos = m_routeAnalyzer.GetAllRouteInformations(); Debug.WriteLine("======== ALL ROUTE INFORMATION ========"); foreach (var info in infos) { Debug.WriteLine(info.ToString()); } Debug.WriteLine(""); Debug.WriteLine(""); }
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, IApplicationLifetime applicationLifetime, UserManager <User> userManager, RoleManager <IdentityRole> roleManager, IRouteAnalyzer routeAnalyzer, MoviesPlaceContext context) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } else { app.UseHsts(); } app.UseMiddleware <JWTInHeaderMiddleware>(); app.ConfigureExceptionHandler(_logger); app.UseHttpsRedirection(); app.UseAuthentication(); app.UseHttpsRedirection(); app.SeedDatabase(); app.UseMvc(); applicationLifetime.ApplicationStarted.Register(() => { var infos = routeAnalyzer.GetAllRouteInformations(); Debug.WriteLine("======== ALL ROUTE INFORMATION ========"); foreach (var info in infos) { Debug.WriteLine(info.ToString()); } Debug.WriteLine(""); Debug.WriteLine(""); }); }
public string ShowAllRoutes() { var infos = _routeAnalyzer.GetAllRouteInformations(); return(infos.Aggregate("", (current, info) => current + (info.ToString() + "\n"))); }
public JsonResult ShowAllRoutes() { var infos = _routeAnalyzer.GetAllRouteInformations(); return(Json(infos)); }