Skip to content

re: Using the Strategy Pattern (Examples in C#) VIEW POST


I used to do similar things, but for task that have a very similar output/process, I tend to use a "DeleteOption" argument to keep the process centralised. I find it easier to then save the parameters with a DataContract.

I guess you use a dictionnary to select the correct function? I usually do this for very unrelated tasks:

IDictionnary <myEnum.MethodName, myIAction>

. Then it is as well quite easy to save it.

code of conduct - report abuse