public ApiControllerBuilder() { _wordService = null; _tagService = null; _appService = null; _requestLogService = null; }
public RequestLogController(IConfiguration configuration, ILogger <SecurityController> logger, IUserService userService, IRequestLogService requestLogService) { _configuration = configuration; _logger = logger; _userService = userService; _requestLogService = requestLogService; }
public DishesController(IDishService dishService, IRestaurantService restaurantService, IIngredientService ingredientService, IRequestLogService requestLogService) { _dishService = dishService; _restaurantService = restaurantService; _ingredientService = ingredientService; _requestLogService = requestLogService; }
public SecurityController(SignInManager <User> signInManager, Microsoft.AspNetCore.Identity.UserManager <User> userManager, IConfiguration configuration, ILogger <SecurityController> logger, Microsoft.AspNetCore.Identity.RoleManager <Role> roleManager, IRequestLogService requestLogService) { _signInManager = signInManager; _userManager = userManager; _configuration = configuration; _logger = logger; _roleManager = roleManager; _requestLogService = requestLogService; }
public AccountController(Microsoft.AspNetCore.Identity.UserManager <User> userManager, SignInManager <User> signInManager, Microsoft.AspNetCore.Identity.RoleManager <Role> roleManager, ILogger <AccountController> logger, IUserService userService, IRequestLogService requestLogService) { _userManager = userManager; _signInManager = signInManager; _roleManager = roleManager; _logger = logger; _userService = userService; _requestLogService = requestLogService; }
public ApiController( IUserService userService, IWordService wordService, ITagService tagService, IAppService appService, IRequestLogService requestLogService, IFormsAuthenticationService formsAuthenticationService) : base(userService, formsAuthenticationService) { _wordService = wordService; _tagService = tagService; _appService = appService; _requestLogService = requestLogService; }
public async Task Invoke(HttpContext context, IRequestLogService requestLogService) { _requestLogService = requestLogService; _logger.LogInformation(await FormatRequest(context.Request)); var originalBodyStream = context.Response.Body; using (var responseBody = new MemoryStream()) { context.Response.Body = responseBody; await _next(context); _logger.LogInformation(await FormatResponse(context.Response)); _requestLogService.CreateRequestLog(context.Request.Method, context.Response.StatusCode.ToString(), context.Request.Path, 27214); await responseBody.CopyToAsync(originalBodyStream); } }
internal ApiControllerBuilder WithFormsRequestLogService(IRequestLogService requestLogService) { _requestLogService = requestLogService; return this; }
public DashboardController(IBaseControllerServiceFacade baseServiceFacade, IContentItemService contentItemService, IRequestLogService requestLogService) : base(baseServiceFacade) { _contentItemService = contentItemService; _requestLogService = requestLogService; }
public AdminController(IRequestLogService requestLogService, RoleManager <IdentityRole> roleManager, UserManager <ApplicationUser> userManager, IConfiguration configuration) : base(roleManager, userManager, configuration) { _requestLogService = requestLogService; }
public RequestActionFilter(IRequestLogService requestLogService) { _requestLogService = requestLogService; }
public EnableLogAttribute() { _logService = DependencyResolver.Current.GetService<IRequestLogService>(); }
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } else { app.UseExceptionHandler("/Error"); app.UseHsts(); } app.UseCors(builder => builder.WithOrigins("http://localhost")); // app.UseRequestResponseLogging app.Use(async(context, next) => { var sw = new Stopwatch(); sw.Start(); await next.Invoke(); sw.Stop(); IRequestLogService service = (IRequestLogService)context.RequestServices.GetService(typeof(IRequestLogService)); var helper = new HttpRequestResponseHelper(service); await helper.saveRequestResponseDetails(context, sw); }); app.UseStaticFiles(); app.UseSpaStaticFiles(); app.UseSwagger(); app.UseSwaggerUI(c => { c.SwaggerEndpoint("/swagger/v1/swagger.json", "LinkitAir API V1"); }); app.UseAuthentication(); app.UseMvc(routes => { routes.MapRoute( name: "default", template: "{controller}/{action=Index}/{id?}"); }); using (var serviceScope = app.ApplicationServices.GetRequiredService <IServiceScopeFactory>().CreateScope()) { var dbContext = serviceScope.ServiceProvider.GetService <AppDbContext>(); var roleManager = serviceScope.ServiceProvider.GetService <RoleManager <IdentityRole> >(); var userManager = serviceScope.ServiceProvider.GetService <UserManager <ApplicationUser> >(); // dbContext.Database.Migrate(); // DbSeeder.Seed(dbContext, roleManager, userManager); } app.UseSpa(spa => { // To learn more about options for serving an Angular SPA from ASP.NET Core, // see https://go.microsoft.com/fwlink/?linkid=864501 spa.Options.SourcePath = "ClientApp"; if (env.IsDevelopment()) { //spa.UseAngularCliServer(npmScript: "start"); spa.UseProxyToSpaDevelopmentServer("http://localhost:4200"); } }); }
internal ApiControllerBuilder WithFormsRequestLogService(IRequestLogService requestLogService) { _requestLogService = requestLogService; return(this); }
public RestaurantsController(IRestaurantService restaurantService, Microsoft.AspNetCore.Identity.UserManager <User> userManager, IRequestLogService requestLogService) { _restaurantService = restaurantService; _userManager = userManager; _requestLogService = requestLogService; }
public RequestLogApiController(IRequestLogService requestLogService) { _requestLogService = requestLogService; }
public HttpRequestResponseHelper(IRequestLogService requestLogService) { _requestLogService = requestLogService; }
public MenusController(IMenuService menuService, IRestaurantService restaurantService, IRequestLogService requestLogService) { _menuService = menuService; _restaurantService = restaurantService; _requestLogService = requestLogService; }
/// <summary> /// Construct Api log middleware /// </summary> /// <param name="next">Request delegate</param> /// <param name="logService">Log service</param> /// <param name="userResolver">User resolver</param> public ApiLogMiddleware(RequestDelegate next, IRequestLogService logService, IUserResolver userResolver) { _next = next; _logService = logService; _userResolver = userResolver; }
public PromotionsController(IPromotionService promotionService, IRequestLogService requestLogService) { _promotionService = promotionService; _requestLogService = requestLogService; }
public IngredientsController(IIngredientService ingredientService, IRequestLogService requestLogService) { _ingredientService = ingredientService; _requestLogService = requestLogService; }
public RatingLogsController(IRatingLogService ratingLogService, IRequestLogService requestLogService) { _ratingLogService = ratingLogService; _requestLogService = requestLogService; }
public RequestLogController(IRequestLogService requestLogService, IMapper mapper) { _requestLogService = requestLogService; _mapper = mapper; }