The lifestyle instance that doesn't cache instances. A new instance of the specified
component is created every time the registered service is requested or injected.
Namespace: SimpleInjector
Assembly: SimpleInjector (in SimpleInjector.dll) Version: 5.3.0
Syntax
Field Value
Type: LifestyleExamples
C#
var container = new Container(); container.Register<ISomeService, SomeServiceImpl>(Lifestyle.Transient);
C#
var container = new Container(); // Transient registration. container.Register<ISomeService, SomeServiceImpl>();
See Also