<PackageReference Include="Castle.Windsor" Version="5.0.1" />

LifestyleGroup<TService>

public class LifestyleGroup<TService> : RegistrationGroup<TService>
public ComponentRegistration<TService> PerThread { get; }

public ComponentRegistration<TService> Pooled { get; }

public ComponentRegistration<TService> Singleton { get; }

public ComponentRegistration<TService> Transient { get; }

public LifestyleGroup(ComponentRegistration<TService> registration)

public ComponentRegistration<TService> BoundTo<TBaseForRoot>()

public ComponentRegistration<TService> BoundTo(Func<IHandler[], IHandler> scopeRootBinder)

public ComponentRegistration<TService> BoundToNearest<TBaseForRoot>()

public ComponentRegistration<TService> Custom(Type customLifestyleType)

Assign a custom lifestyle type, that implements ILifestyleManager .

public ComponentRegistration<TService> Custom<TLifestyleManager>() where TLifestyleManager : ILifestyleManager

Assign a custom lifestyle type, that implements ILifestyleManager .

public ComponentRegistration<TService> Is(LifestyleType type)

Sets the lifestyle to the specified type .

public ComponentRegistration<TService> PooledWithSize(int? initialSize, int? maxSize)

public ComponentRegistration<TService> Scoped<TScopeAccessor>() where TScopeAccessor : IScopeAccessor

Assigns scoped lifestyle with scope accessed via TScopeAccessor instances.

public ComponentRegistration<TService> Scoped(Type scopeAccessorType)

Assigns scoped lifestyle with scope accessed via scopeAccessorType instances if provided, or default accessor otherwise.

public ComponentRegistration<TService> Scoped()

Assigns scoped lifestyle with scope accessed via default accessor.