dimanche 15 novembre 2020

What is the name of this extension method pattern?

In order to separate parameter validation (which we want to execute immediately) from the iteration/yield part of LINQ type extension methods (which we want to be deferred), some people use a pattern as shown in this SO answer:

https://stackoverflow.com/a/30176240/172769

I've been trying to search for the name of that pattern where extension methods are split into two parts, one that validates arguments, and the other that performs iteration/yield over a collection.

Does this pattern have an official name?

Aucun commentaire:

Enregistrer un commentaire