Apply JobFilterAttribute for interface implementation

Tags: #<Tag:0x00007f6a01094490>



We recently ran into an issue where for architectural reasons we had tried to apply job configuration to the implementation classes of the job interfaces we created as a means to better structure how background processing would be queued as well as limiting the spread of dependency on Hangfire throughout the project.

We have come to the conclusion now that JobFilterAttributes are applied to the type registered ONLY. Is there no other way to possibly include the type implementing the interface as well? I would imagine it might include extending the JobActivator to provide the actual type it will resolve or to resolve the job type earlier and include it’s type in the process that applies the JobFilterAttributes.