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

Castle.MicroKernel.Registration.ComponentRegistration<TService>

public class ComponentRegistration<TService> : IRegistration
Registration for a single type as a component with the kernel.

You can create a new registration with the Component factory.
namespace Castle.MicroKernel.Registration { public class ComponentRegistration<TService> : IRegistration where TService : class { public Type Implementation { get; } public LifestyleGroup<TService> LifeStyle { get; } public string Name { get; } public ProxyGroup<TService> Proxy { get; } public ComponentRegistration(); public ComponentRegistration(params Type[] services); public ComponentRegistration<TService> Activator<TActivator>() where TActivator : IComponentActivator; public ComponentRegistration<TService> AddAttributeDescriptor(string key, string value); public ComponentRegistration<TService> AddDescriptor(IComponentModelDescriptor descriptor); public AttributeKeyDescriptor<TService> Attribute(string key); public ComponentRegistration<TService> Configuration(params Node[] configNodes); public ComponentRegistration<TService> Configuration(IConfiguration configuration); public ComponentRegistration<TService> DependsOn(Dependency dependency); public ComponentRegistration<TService> DependsOn(params Dependency[] dependencies); public ComponentRegistration<TService> DependsOn(Arguments dependencies); public ComponentRegistration<TService> DependsOn(IDictionary dependencies); public ComponentRegistration<TService> DependsOn(object dependenciesAsAnonymousType); public ComponentRegistration<TService> DependsOn(DynamicParametersDelegate resolve); public ComponentRegistration<TService> DependsOn(DynamicParametersResolveDelegate resolve); public ComponentRegistration<TService> DependsOn(DynamicParametersWithContextResolveDelegate resolve); public ComponentRegistration<TService> DynamicParameters(DynamicParametersDelegate resolve); public ComponentRegistration<TService> DynamicParameters(DynamicParametersResolveDelegate resolve); public ComponentRegistration<TService> DynamicParameters(DynamicParametersWithContextResolveDelegate resolve); public ComponentRegistration<TService> ExtendedProperties(params Property[] properties); public ComponentRegistration<TService> ExtendedProperties(Property property); public ComponentRegistration<TService> ExtendedProperties(object anonymous); public ComponentRegistration<TService> Forward(params Type[] types); public ComponentRegistration<TService> Forward<TService2>(); public ComponentRegistration<TService> Forward<TService2, TService3>(); public ComponentRegistration<TService> Forward<TService2, TService3, TService4>(); public ComponentRegistration<TService> Forward<TService2, TService3, TService4, TService5>(); public ComponentRegistration<TService> Forward(IEnumerable<Type> types); public ComponentRegistration<TService> ImplementedBy<TImpl>() where TImpl : TService; public ComponentRegistration<TService> ImplementedBy(Type type); public ComponentRegistration<TService> ImplementedBy(Type type, IGenericImplementationMatchingStrategy genericImplementationMatchingStrategy); public ComponentRegistration<TService> ImplementedBy(Type type, IGenericServiceStrategy genericServiceStrategy); public ComponentRegistration<TService> ImplementedBy(Type type, IGenericImplementationMatchingStrategy genericImplementationMatchingStrategy, IGenericServiceStrategy genericServiceStrategy); public ComponentRegistration<TService> Instance(TService instance); public InterceptorGroup<TService> Interceptors(params InterceptorReference[] interceptors); public ComponentRegistration<TService> Interceptors(params Type[] interceptors); public ComponentRegistration<TService> Interceptors<TInterceptor>() where TInterceptor : IInterceptor; public ComponentRegistration<TService> Interceptors<TInterceptor1, TInterceptor2>() where TInterceptor1 : IInterceptor where TInterceptor2 : IInterceptor; public ComponentRegistration<TService> Interceptors(params string[] keys); public ComponentRegistration<TService> LifestyleCustom(Type customLifestyleType); public ComponentRegistration<TService> LifestyleCustom<TLifestyleManager>() where TLifestyleManager : ILifestyleManager, new; public ComponentRegistration<TService> LifestylePerThread(); public ComponentRegistration<TService> LifestyleScoped(Type scopeAccessorType = null); public ComponentRegistration<TService> LifestyleScoped<TScopeAccessor>() where TScopeAccessor : IScopeAccessor, new; public ComponentRegistration<TService> LifestyleBoundTo<TBaseForRoot>() where TBaseForRoot : class; public ComponentRegistration<TService> LifestyleBoundToNearest<TBaseForRoot>() where TBaseForRoot : class; public ComponentRegistration<TService> LifestyleBoundTo(Func<IHandler[], IHandler> scopeRootBinder); public ComponentRegistration<TService> LifestylePooled(int? initialSize = default(int?), int? maxSize = default(int?)); public ComponentRegistration<TService> LifestyleSingleton(); public ComponentRegistration<TService> LifestyleTransient(); public ComponentRegistration<TService> Named(string name); public ComponentRegistration<TService> NamedAutomatically(string name); public ComponentRegistration<TService> OnCreate(params Action<TService>[] actions); public ComponentRegistration<TService> OnCreate(params LifecycleActionDelegate<TService>[] actions); public ComponentRegistration<TService> OnDestroy(params Action<TService>[] actions); public ComponentRegistration<TService> OnDestroy(params LifecycleActionDelegate<TService>[] actions); public ComponentRegistration<TService> OnlyNewServices(); public ComponentRegistration<TService> OverWrite(); public ComponentRegistration<TService> SelectInterceptorsWith(IInterceptorSelector selector); public ComponentRegistration<TService> SelectInterceptorsWith(Action<ItemRegistration<IInterceptorSelector>> selector); public ComponentRegistration<TService> UsingFactory<TFactory, TServiceImpl>(Func<TFactory, TServiceImpl> factory) where TServiceImpl : TService; public ComponentRegistration<TService> UsingFactoryMethod<TImpl>(Func<TImpl> factoryMethod, bool managedExternally = false) where TImpl : TService; public ComponentRegistration<TService> UsingFactoryMethod<TImpl>(Func<IKernel, TImpl> factoryMethod, bool managedExternally = false) where TImpl : TService; public ComponentRegistration<TService> UsingFactoryMethod<TImpl>(Func<IKernel, ComponentModel, CreationContext, TImpl> factoryMethod, bool managedExternally = false) where TImpl : TService; public ComponentRegistration<TService> UsingFactoryMethod<TImpl>(Func<IKernel, CreationContext, TImpl> factoryMethod) where TImpl : TService; public ComponentRegistration<TService> IsDefault(Predicate<Type> serviceFilter); public ComponentRegistration<TService> IsDefault(); public ComponentRegistration<TService> IsFallback(Predicate<Type> serviceFilter); public ComponentRegistration<TService> IsFallback(); public ComponentRegistration<TService> PropertiesIgnore(Func<PropertyInfo, bool> propertySelector); public ComponentRegistration<TService> PropertiesRequire(Func<PropertyInfo, bool> propertySelector); public ComponentRegistration<TService> PropertiesIgnore(Func<ComponentModel, PropertyInfo, bool> propertySelector); public ComponentRegistration<TService> PropertiesRequire(Func<ComponentModel, PropertyInfo, bool> propertySelector); public ComponentRegistration<TService> Properties(PropertyFilter filter); } }