C# Class Castle.MicroKernel.Resolvers.SpecializedResolvers.CollectionResolver

More generic alternative to ArrayResolver and ListResolver. It supports arrays as well as any generic interface type assignable from arrays.
The collection instance that is provided is read only, even for interfaces like IList{T}
Inheritance: ISubDependencyResolver
Mostra file Open project: castleproject/Windsor

Protected Properties

Property Type Description
allowEmptyCollections bool
kernel IKernel

Public Methods

Method Description
CanResolve ( CreationContext context, ISubDependencyResolver contextHandlerResolver, ComponentModel model, DependencyModel dependency ) : bool
CollectionResolver ( IKernel kernel, bool allowEmptyCollections = false ) : System
Resolve ( CreationContext context, ISubDependencyResolver contextHandlerResolver, ComponentModel model, DependencyModel dependency ) : object

Protected Methods

Method Description
CanSatisfy ( Type itemType ) : bool
GetItemType ( Type targetItemType ) : Type
HasParameter ( DependencyModel dependency ) : bool

Method Details

CanResolve() public method

public CanResolve ( CreationContext context, ISubDependencyResolver contextHandlerResolver, ComponentModel model, DependencyModel dependency ) : bool
context Castle.MicroKernel.Context.CreationContext
contextHandlerResolver ISubDependencyResolver
model Castle.Core.ComponentModel
dependency Castle.Core.DependencyModel
return bool

CanSatisfy() protected method

protected CanSatisfy ( Type itemType ) : bool
itemType System.Type
return bool

CollectionResolver() public method

public CollectionResolver ( IKernel kernel, bool allowEmptyCollections = false ) : System
kernel IKernel
allowEmptyCollections bool
return System

GetItemType() protected method

protected GetItemType ( Type targetItemType ) : Type
targetItemType System.Type
return System.Type

HasParameter() protected method

protected HasParameter ( DependencyModel dependency ) : bool
dependency Castle.Core.DependencyModel
return bool

Resolve() public method

public Resolve ( CreationContext context, ISubDependencyResolver contextHandlerResolver, ComponentModel model, DependencyModel dependency ) : object
context Castle.MicroKernel.Context.CreationContext
contextHandlerResolver ISubDependencyResolver
model Castle.Core.ComponentModel
dependency Castle.Core.DependencyModel
return object

Property Details

allowEmptyCollections protected_oe property

protected bool allowEmptyCollections
return bool

kernel protected_oe property

protected IKernel kernel
return IKernel