internal IFoo Create(CreationInfo creationInfo) { var fooBuilderWithLog = new AddLoggingToFooBuilder(); foreach (var fooObjectBuilder in _strategies) { creationInfo.FooInstance = fooObjectBuilder.Build(creationInfo); if (creationInfo.FooInstance != null) break; } return fooBuilderWithLog.Build(creationInfo); }
internal IFoo Create(CreationInfo creationInfo) { var fooBuilderWithLog = new AddLoggingToFooBuilder(); foreach (var fooObjectBuilder in _strategies) { creationInfo.FooInstance = fooObjectBuilder.Build(creationInfo); if (creationInfo.FooInstance != null) { break; } } return(fooBuilderWithLog.Build(creationInfo)); }