I'm attempting to get Quartz working in a project.
The startup code for Quartz makes a few calls like the following
serviceProvider.GetServices<JobListenerConfiguration>();
This results in call to
serviceProvider.GetRequiredService<IEnumerable<JobListenerConfiguration>>();
There is nothing registered for JobListenerConfiguration. When running this code in a project without grace, this results in an empty array of JobListenerConfiguration being returned. I don't believe anything is specifically registering that as a service.
On the other hand grace attempts to locate and inject parameters into JobListenerConfiguration, which fails because one of the parameters is just Type listenerType
I've worked around this by specifically registering an empty enumerable for IEnumerable<JobListenerConfiguration> which was complicated by JobListenerConfiguration being an internal type.
Not sure if this is a bug exactly, but I think ideally grace would also return an empty enumerable and not try to figure out how to inject services into the constructor of a type that is not registered with it when the request is for a collection of said type.
I'm attempting to get Quartz working in a project.
The startup code for Quartz makes a few calls like the following
This results in call to
There is nothing registered for
JobListenerConfiguration. When running this code in a project without grace, this results in an empty array ofJobListenerConfigurationbeing returned. I don't believe anything is specifically registering that as a service.On the other hand grace attempts to locate and inject parameters into
JobListenerConfiguration, which fails because one of the parameters is justType listenerTypeI've worked around this by specifically registering an empty enumerable for
IEnumerable<JobListenerConfiguration>which was complicated byJobListenerConfigurationbeing an internal type.Not sure if this is a bug exactly, but I think ideally grace would also return an empty enumerable and not try to figure out how to inject services into the constructor of a type that is not registered with it when the request is for a collection of said type.