I have an abstruct class with abstract method, the method param is generic.
this is the param type declaration:
public class StepHandlerWrapper<T> where T : BaseStepDataModel{...}
this is the parent abstract:
this is actually the problem, I want the StepHandlerWrapper generic type to be dynamic on each implementaion:
public abstract class BaseStepHandler{
protected abstract HandlerResult Handle(StepHandlerWrapper<???????????????> );
}
these are 2 implementations Note the generic type on each one (different):
public class LoginHandler : BaseStepHandler {
protected override HandlerResult Handle(StepHandlerWrapper<LoginStepOneDataModel> wrapper){...}
}
public class RegularDemoAccountHandler : BaseStepHandler{
protected override HandlerResult Handle(StepHandlerWrapper<RegularDemoAccountStepOneDataModel> wrapper){...}
}
how do I make each implementation of the abstract method to be different?
You need to make
BaseStepHandlergeneric as well: