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);
        }
示例#2
0
        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));
        }