It would be useful to have a method ("ForAll" is the proposed name, but there are a number of other possibilities) that can be used to configure all tasks of a particular type. For example, in the current baufile.csx, there are two instances of the MSBuild task that have a lot of duplicate configuration. Some of that duplication could be reduced by having some reasonable defaults on the MSBuild task (bau-build/bau-msbuild#15), but not all of it; for example, the solution file could not be defaulted, and we want to be able to set the configuration via a script property (#212). Those properties could potentially be set by calling a common method in the script, however that doesn't fit very well into the fluent syntax tha Bau uses (not to mention that ScriptCS seems to have a number of issues with embedded methods).
It would be useful to have a method ("ForAll" is the proposed name, but there are a number of other possibilities) that can be used to configure all tasks of a particular type. For example, in the current baufile.csx, there are two instances of the MSBuild task that have a lot of duplicate configuration. Some of that duplication could be reduced by having some reasonable defaults on the MSBuild task (bau-build/bau-msbuild#15), but not all of it; for example, the solution file could not be defaulted, and we want to be able to set the configuration via a script property (#212). Those properties could potentially be set by calling a common method in the script, however that doesn't fit very well into the fluent syntax tha Bau uses (not to mention that ScriptCS seems to have a number of issues with embedded methods).
Proposed usage:
This will be especially useful if we start using plugins that create tasks for us (as in #220).