You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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);
The text was updated successfully, but these errors were encountered:
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
The text was updated successfully, but these errors were encountered: