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

LifestyleModelInspector

Inspects the component configuration and the type looking for a definition of lifestyle type. The configuration preceeds whatever is defined in the component.

public virtual void ProcessModel(IKernel kernel, ComponentModel model)

Searches for the lifestyle in the configuration and, if unsuccessful look for the lifestyle attribute in the implementation type.

protected virtual bool ReadLifestyleFromConfiguration(ComponentModel model)

Reads the attribute "lifestyle" associated with the component configuration and tries to convert to LifestyleType enum type.

protected virtual void ReadLifestyleFromType(ComponentModel model)

Check if the type expose one of the lifestyle attributes defined in Castle.Model namespace.

protected virtual void ValidateTypeFromAttribute(Type typeFromAttribute, Type expectedInterface, string attribute)