C# Class Castle.MicroKernel.ModelBuilder.Inspectors.LifestyleModelInspector

Inheritance: IContributeComponentModelConstruction
Show file Open project: castleproject/Windsor

Public Methods

Method Description
LifestyleModelInspector ( IConversionManager converter ) : System
ProcessModel ( IKernel kernel, ComponentModel model ) : void

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

Protected Methods

Method Description
ReadLifestyleFromConfiguration ( ComponentModel model ) : bool

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

ReadLifestyleFromType ( ComponentModel model ) : void

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

ValidateTypeFromAttribute ( Type typeFromAttribute, Type expectedInterface, string attribute ) : void

Private Methods

Method Description
ExtractBinder ( Type scopeRootBinderType, string name ) : IHandler>.Func
ExtractPoolConfig ( ComponentModel model ) : void
GetMandatoryTypeFromAttribute ( ComponentModel model, string attribute, LifestyleType lifestyleType ) : Type
GetTypeFromAttribute ( ComponentModel model, string attribute ) : Type
IsBindMethod ( MemberInfo methodMember, object _ ) : bool

Method Details

LifestyleModelInspector() public method

public LifestyleModelInspector ( IConversionManager converter ) : System
converter IConversionManager
return System

ProcessModel() public method

Searches for the lifestyle in the configuration and, if unsuccessful look for the lifestyle attribute in the implementation type.
public ProcessModel ( IKernel kernel, ComponentModel model ) : void
kernel IKernel
model Castle.Core.ComponentModel
return void

ReadLifestyleFromConfiguration() protected method

Reads the attribute "lifestyle" associated with the component configuration and tries to convert to LifestyleType enum type.
protected ReadLifestyleFromConfiguration ( ComponentModel model ) : bool
model Castle.Core.ComponentModel
return bool

ReadLifestyleFromType() protected method

Check if the type expose one of the lifestyle attributes defined in Castle.Model namespace.
protected ReadLifestyleFromType ( ComponentModel model ) : void
model Castle.Core.ComponentModel
return void

ValidateTypeFromAttribute() protected method

protected ValidateTypeFromAttribute ( Type typeFromAttribute, Type expectedInterface, string attribute ) : void
typeFromAttribute System.Type
expectedInterface System.Type
attribute string
return void