Open hikalkan opened 6 years ago
What's more is that now there's Microsoft.Extensions.Hosting
package that allows you to use the same DI and other libraries from ASP.NET Core without depending on HTTP stuff. But Hangfire.AspNetCore
uses IApplicationBuilder
to start its servers. And that's a problem since there's no such thing in generic hosting.
I want to create a Console application. I want to use
Microsoft.Extensions.DependencyInjection
package, so I use the power of DI in this console app.Currently, the only option is to depend of the
Hangfire.AspNetCore
package package.But the
Hangfire.AspNetCore
package depends on theMicrosoft.AspNetCore.Hosting.Abstractions
andMicrosoft.AspNetCore.Http.Abstractions
packages which is unnecessary for a console app.As I see the source code, most of the code is independent from AspNet Core and you can create a separated package that only depends on the
Microsoft.Extensions.DependencyInjection.Abstractions
andMicrosoft.Extensions.Logging.Abstractions
. Then you can depend on this new package from theHangfire.AspNetCore
package.