You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
using Microsoft.AspNetCore.Builder;
|
|
|
|
|
using Microsoft.AspNetCore.Http;
|
|
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace Quartz.NET.Web.Extensions
|
|
|
|
|
{
|
|
|
|
|
public static class StaticHttpContextExtensions
|
|
|
|
|
{
|
|
|
|
|
public static IApplicationBuilder UseStaticHttpContext(this IApplicationBuilder app)
|
|
|
|
|
{
|
|
|
|
|
var httpContextAccessor = app.ApplicationServices.GetRequiredService<IHttpContextAccessor>();
|
|
|
|
|
Utility.HttpContext.Configure(httpContextAccessor);
|
|
|
|
|
return app;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|