I have an abstract class as defined here:
public abstract class BaseClientService<T>
where T : ISubsetInfo
{
abstract T Extract(Superset superset);
}
This works well for all of my implementation, but now I am faced with an implementation that needs an additional argument in order to perform correctly.
eg
T Extract(Superset superset, int id)
I'm trying to find the most elegant solution, so am trying to avoid including the second argument as either nullable or optional, but I'm not sure if it is worth the effort...
I also though about wrapping the arguments in an object, and having that object include the id for the edgecase, but I think its making it more complex where I'm trying to make it simpler.
The important constraint for me is that I always have one method to call in the abstract class.