I'm making a decision that I wanted to throw out for comment.
I have a series of contracts that do the same thing. The exporting classes will all just have an Output method. I can think of a few ways to handle this...
- - Use a string contract. I dislike explicit string contracts except when I am picking up a primitive type with a specific purpose
- - Use a single IOutput interface contract and metadata string to differentiate which class should be used
- - Have separate empty contracts for each purpose and have them all inherit from the IOutput interface
I am leaning to the third approach but wanted to see what other folks thought. I want to make it very easy for people to create new purposes, and want to avoid strings as much as possible. People adding new purposes will already be recompiling the app I
expect, although any approach but explicit strings may require them to recompile an assembly they otherwise would not need.
These purposes are very unique, and the fact they all just use the same single method does not seem important. I perceive them as more than variations on a theme and the third approach provides Intellisense