Would it be possible to constraint a Type parameter to only allow caller to pass in class type that implements a certain interface? Take below as example:
public void RegisterProcessors(params Type[] types)
As it is now, caller can pass in any class type to this method. For example:
RegisterProcessors(typeof(string));
But what I really want is to only allow caller to pass in type that implements the IProcessor interface. Is that possible? Something like below, of course, below is syntactically wrong
public void RegisterProcessors(params Type<IProcessor>[] types)