Currently all concrete types that are auto registered by the container are assumed to be transient. It would be nice to be able to provide a Func<Type,ICompiledLifeStyle> delegate that allows the user to provide lifestyles for concrete types.
An example implementation could be
public static ICompiledLifeStyle SingletonLifeStylePicker(Type type)
{
return type.Name.EndsWith("Singleton") ? new SingletonLifeStyle() : null;
}
var container = new DependencyInjectionContainer(c => c.ConcreteLifeStylePicker = SingletonLifeStylePicker);
Currently all concrete types that are auto registered by the container are assumed to be transient. It would be nice to be able to provide a
Func<Type,ICompiledLifeStyle>
delegate that allows the user to provide lifestyles for concrete types.An example implementation could be