C# Class Composable.Windsor.KeyReplacementHandlerSelector

When multiple registrations to the same type are made this HandlerSelector returns the service registered with the 'replacementKey' when the container is asked for a service with 'originalKey' Use it by adding it to the container at wire-up with container.Kernel.AddHandlerSelector(new KeyReplacementHandlerSelector(typeof([ComponentType]),"originalKey", "replacementKey"));
Inheritance: IHandlerSelector
Show file Open project: mlidbom/Composable.Monolithic

Public Methods

Method Description
HasOpinionAbout ( string key, Type service ) : bool
KeyReplacementHandlerSelector ( Type serviceType, string originalKey, string replacementKey ) : System
SelectHandler ( string key, Type service, IHandler handlers ) : IHandler

Method Details

HasOpinionAbout() public method

public HasOpinionAbout ( string key, Type service ) : bool
key string
service System.Type
return bool

KeyReplacementHandlerSelector() public method

public KeyReplacementHandlerSelector ( Type serviceType, string originalKey, string replacementKey ) : System
serviceType System.Type
originalKey string
replacementKey string
return System

SelectHandler() public method

public SelectHandler ( string key, Type service, IHandler handlers ) : IHandler
key string
service System.Type
handlers IHandler
return IHandler