I have the following interface
public interface ICheckEvaluator<in TCheck> where TCheck : ResourceCheck
that needs to be injected with the following implementation:
public class OutageCheckEvaluator : ICheckEvaluator<OutageCheck>
Can someone provide an advice as to how this can be done? OutageCheck inherits from ResourceCheck:
public partial class OutageCheck : ResourceCheck
The following method didnt work:
builder.RegisterType<OutageCheckEvaluator>().As<ICheckEvaluator<OutageCheck>>();
as Autofac receives ICheckEvaluator(ResourceCheck) to implement and cannot match it to ICheckEvalutor(OutageCheck)
Appreciate any advice here.