Implement JobFilterAttribute with Dependency Injection

Hi, I want to use filter in ASP. NET 7 but I need Dependency Injection.
I tried this approaches but does not work: c# - How can I use Dependency Injection in a .Net Core ActionFilterAttribute? - Stack Overflow
How can I use dependency injection in Hangfire filter?