Imagine I have a document (word document).
I have an enumeration which will indicate how to extract data from the document. So if I want just text, the images, or both (3 members of the enumeration).
I have a case statement based on this enumeration, but without falling into a code smell, how can I write code which isn't too repetitive? For every condition in the switch, should I have a seperate method (the easiest way), or a method accepting a paremeter (like the value of the enumeration), and then use if statements to say if(xyz) do abc, and so on.
Or is there a quicker, more efficient way?
Thanks