I have a Task entity that needs to be Resolved based on the type of Task it is. I would encapsulate the logic for a specific type of Task in a class, but what is the generally accepted way to match the type with the class that implements the Resolving logic?
My first impulse is to do a Factory, like:
TaskResolverFactory.GetForType(TaskType) // returns IsATaskResolver, which has a Resolve method Probably inside the Factory, a Case statement or something.
Another thought is to use something like StructureMap, but I think that is overkill for this situation - do you agree?
What other methods am I missing, and what is the generally accepted method for replacing a big Case/Switch statement?