public static FubuApplication StructureMapObjectFactory(this IContainerFacilityExpression expression, Action <IInitializationExpression> structureMapBootstrapper) { return(expression.StructureMap(() => { ObjectFactory.Initialize(structureMapBootstrapper); return ObjectFactory.Container; })); }
/// <summary> /// Applies the given StructureMap container as the root container for this FubuMVC application /// </summary> /// <param name="expression"></param> /// <param name="container"></param> /// <returns></returns> public static FubuApplication StructureMap(this IContainerFacilityExpression expression, IContainer container) { return(expression.StructureMap(() => container)); }
/// <summary> /// Applies a new StructureMap container to the FubuMVC application /// </summary> /// <param name="expression"></param> /// <returns></returns> public static FubuApplication StructureMap(this IContainerFacilityExpression expression) { return(expression.StructureMap(new Container())); }
/// <summary> /// Apply a new StructureMap container for the application using the specified StructureMap Registry /// </summary> /// <typeparam name="T"></typeparam> /// <param name="expression"></param> /// <returns></returns> public static FubuApplication StructureMap <T>(this IContainerFacilityExpression expression) where T : Registry, new() { return(expression.StructureMap(() => new Container(new T()))); }
public static FubuApplication StructureMapObjectFactory(this IContainerFacilityExpression expression) { return(expression.StructureMap(() => ObjectFactory.Container)); }