Skip to content

IServiceLifetimeSelector Methods

InterfaceMethods4 members
The Compiled Lifetime Selector
WithLifetime(ServiceLifetime)Section titled WithLifetime(ServiceLifetime)abstract
Registers each matching concrete type with the specified lifetime.
public interface IServiceLifetimeSelector
{
public abstract void WithLifetime(
ServiceLifetime lifetime)
{
// ...
}
}
lifetimeServiceLifetime
WithScopedLifetimeSection titled WithScopedLifetimeabstract
Registers each matching concrete type with ServiceLifetime.Scoped lifetime.
public interface IServiceLifetimeSelector
{
public abstract void WithScopedLifetime()
{
// ...
}
}
WithSingletonLifetimeSection titled WithSingletonLifetimeabstract
Registers each matching concrete type with ServiceLifetime.Singleton lifetime.
public interface IServiceLifetimeSelector
{
public abstract void WithSingletonLifetime()
{
// ...
}
}
WithTransientLifetimeSection titled WithTransientLifetimeabstract
Registers each matching concrete type with ServiceLifetime.Transient lifetime.
public interface IServiceLifetimeSelector
{
public abstract void WithTransientLifetime()
{
// ...
}
}