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

Component

public static class Component
Factory for creating ComponentRegistration objects. Use static methods on the class to fluently build registration.
public static ComponentRegistration For(Type serviceType)

Creates a component registration for the serviceType

public static ComponentRegistration For(Type[] serviceTypes)

Creates a component registration for the serviceTypes

public static ComponentRegistration For(IEnumerable<Type> serviceTypes)

Creates a component registration for the serviceTypes

public static ComponentRegistration<TService> For<TService>()

Creates a component registration for the service type.

public static ComponentRegistration<TService1> For<TService1, TService2>()

Creates a component registration for the service types.

public static ComponentRegistration<TService1> For<TService1, TService2, TService3>()

Creates a component registration for the service types.

public static ComponentRegistration<TService1> For<TService1, TService2, TService3, TService4>()

Creates a component registration for the service types.

public static ComponentRegistration<TService1> For<TService1, TService2, TService3, TService4, TService5>()

Creates a component registration for the service types.

public static bool HasAttribute<TAttribute>(Type type) where TAttribute : Attribute

Helper method for filtering components based on presence of an Attribute.

public static Predicate<Type> HasAttribute<TAttribute>(Predicate<TAttribute> filter) where TAttribute : Attribute

Helper method for filtering components based on presence of an Attribute and value of predicate on that attribute.

public static bool IsCastleComponent(Type type)

Determines if the component is a Castle component, that is - if it has a CastleComponentAttribute.

public static Predicate<Type> IsInNamespace(string namespace)

Creates a predicate to check if a component is in a namespace.

public static Predicate<Type> IsInNamespace(string namespace, bool includeSubnamespaces)

Creates a predicate to check if a component is in a namespace.

public static Predicate<Type> IsInSameNamespaceAs(Type type)

Creates a predicate to check if a component shares a namespace with another.

public static Predicate<Type> IsInSameNamespaceAs(Type type, bool includeSubnamespaces)

Creates a predicate to check if a component shares a namespace with another.

public static Predicate<Type> IsInSameNamespaceAs<T>()

Creates a predicate to check if a component shares a namespace with another.

public static Predicate<Type> IsInSameNamespaceAs<T>(bool includeSubnamespaces)

Creates a predicate to check if a component shares a namespace with another.