that is "inlined" at code completion level by CompositeConfigFragmentExtensions
and ICompositeConfigFragmentContainer "trait" (applied to CompositeConfigElementBuilder).
Add 3 unit tests:
(control) Check the CompositeConfigElementBuilder directly (no PipelineBuilder used).
(control) Check PipelineBuilder finding CompositeConfigElementBuilder (no properties set yet).
(actual) Check PipelineBuilder using the builder extension methods (supplied to CompositeConfigElementBuilder by CompositeConfigFragmentExtensions via implementation of ICompositeConfigFragmentContainer "trait").
Rewrite explicit 3-step switch in PipelineBuilder.GetMethods into IEnumerable generator FindPotentialMethods with yield statements.
Will enable moving existing (ShareUsageConnectionString, Container) properties out, together with the new ones (S3AccessKey, S3SecretKey, S3Region, S3BucketName) into a single reusable section, and implement validation logic at that level (i.e. also reusable with the section itself) while keeping "setters" appear (at compilation and config levels) on the builder itself.
Changes
PipelineBuilder
to also search for suitable extension setter-methods (in the same assembly as builder type).CompositeConfigElementBuilder
class withCompositeConfigFragment
)CompositeConfigFragmentExtensions
ICompositeConfigFragmentContainer
"trait" (applied toCompositeConfigElementBuilder
).CompositeConfigElementBuilder
directly (noPipelineBuilder
used).PipelineBuilder
findingCompositeConfigElementBuilder
(no properties set yet).PipelineBuilder
using the builder extension methods (supplied toCompositeConfigElementBuilder
byCompositeConfigFragmentExtensions
via implementation ofICompositeConfigFragmentContainer
"trait").PipelineBuilder.GetMethods
intoIEnumerable
generatorFindPotentialMethods
withyield
statements.Why
ShareUsageConnectionString
,Container
) properties out, together with the new ones (S3AccessKey
,S3SecretKey
,S3Region
,S3BucketName
) into a single reusable section, and implement validation logic at that level (i.e. also reusable with the section itself) while keeping "setters" appear (at compilation and config levels) on the builder itself.