lundi 4 juin 2018

Pass optional parameters across chain of calls

I have a chain of method calls and I need in a specific target to pass some extra parameters but these parameters are only relevant to that target.
Is there a neat pattern to pass the extra params via some kind of delegate object/cache so that I won’t need to refactor the existing methods and pass null in all other cases for the new params?

Aucun commentaire:

Enregistrer un commentaire