Exemplo n.º 1
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);
        }
Exemplo n.º 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));
        }