ConfigureFrameworkServices.cs 417 B

123456789101112131415
  1. using Microsoft.AspNetCore.Http;
  2. using Microsoft.Extensions.DependencyInjection;
  3. namespace CZFW.Framework
  4. {
  5. public static class ConfigureFrameworkServicesExtension
  6. {
  7. public static IServiceCollection ConfigureFrameworkServices(this IServiceCollection services)
  8. {
  9. services.AddSingleton<IHttpContextAccessor, HttpContextAccessor>();
  10. return services;
  11. }
  12. }
  13. }