From: <jer...@us...> - 2008-08-07 22:07:20
|
Revision: 131 http://structuremap.svn.sourceforge.net/structuremap/?rev=131&view=rev Author: jeremydmiller Date: 2008-08-07 22:07:17 +0000 (Thu, 07 Aug 2008) Log Message: ----------- got a bug fixed with the way we iterate through PipelineGraph that was reported by Derik Whittaker Modified Paths: -------------- trunk/Source/StructureMap/PipelineGraph.cs Modified: trunk/Source/StructureMap/PipelineGraph.cs =================================================================== --- trunk/Source/StructureMap/PipelineGraph.cs 2008-08-07 21:52:19 UTC (rev 130) +++ trunk/Source/StructureMap/PipelineGraph.cs 2008-08-07 22:07:17 UTC (rev 131) @@ -81,15 +81,16 @@ public void Visit(IPipelineGraphVisitor visitor) { - foreach (KeyValuePair<Type, IInstanceFactory> pair in _factories) + var factories = new IInstanceFactory[_factories.Count]; + _factories.Values.CopyTo(factories, 0); + + foreach (IInstanceFactory factory in factories) { - Type pluginType = pair.Value.PluginType; + Type pluginType = factory.PluginType; Instance defaultInstance = _profileManager.GetDefault(pluginType); - pair.Value.AcceptVisitor(visitor, defaultInstance); + factory.AcceptVisitor(visitor, defaultInstance); } - - } // Useful for the validation logic This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |