From: <jer...@us...> - 2009-12-05 18:40:48
|
Revision: 277 http://structuremap.svn.sourceforge.net/structuremap/?rev=277&view=rev Author: jeremydmiller Date: 2009-12-05 18:40:41 +0000 (Sat, 05 Dec 2009) Log Message: ----------- convenience method on GenericFamilyExpression that I needed for FubuMVC Modified Paths: -------------- trunk/Source/StructureMap/Configuration/DSL/Expressions/GenericFamilyExpression.cs Modified: trunk/Source/StructureMap/Configuration/DSL/Expressions/GenericFamilyExpression.cs =================================================================== --- trunk/Source/StructureMap/Configuration/DSL/Expressions/GenericFamilyExpression.cs 2009-12-04 23:00:27 UTC (rev 276) +++ trunk/Source/StructureMap/Configuration/DSL/Expressions/GenericFamilyExpression.cs 2009-12-05 18:40:41 UTC (rev 277) @@ -85,7 +85,7 @@ } - private GenericFamilyExpression add(Instance instance) + public GenericFamilyExpression Add(Instance instance) { return alterAndContinue(family => family.AddInstance(instance)); } @@ -176,9 +176,11 @@ /// <returns></returns> public GenericFamilyExpression AddConcreteType(Type concreteType) { - return add(new ConfiguredInstance(concreteType)); + var instance = new ConfiguredInstance(concreteType); + return Add(instance); } + /// <summary> /// Shortcut method to add an additional Instance to this Plugin Type /// as just a Concrete Type by a specified name. You can also chain other declarations after @@ -189,7 +191,7 @@ /// <returns></returns> public GenericFamilyExpression AddConcreteType(Type concreteType, string instanceName) { - return add(new ConfiguredInstance(concreteType).WithName(instanceName)); + return Add(new ConfiguredInstance(concreteType).WithName(instanceName)); } } } \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |