C# Class Composable.Windsor.DefaultToKeyHandlerSelector

When multiple registrations to the same type are made this HandlerSelector defaults selection to the one with the specified key (instead of the default Windsor behavior of defaulting to the first registered service) Use it by adding it to the container at wire-up with container.Kernel.AddHandlerSelector(new DefaultToKeyHandlerSelector(typeof([ComponentType]),"defaultKey"));
Inheritance: IHandlerSelector
Datei anzeigen Open project: mlidbom/Composable.Monolithic

Public Methods

Method Description
DefaultToKeyHandlerSelector ( Type type, string keyToDefaultTo ) : System
HasOpinionAbout ( string key, Type service ) : bool
SelectHandler ( string key, Type service, IHandler handlers ) : IHandler

Method Details

DefaultToKeyHandlerSelector() public method

public DefaultToKeyHandlerSelector ( Type type, string keyToDefaultTo ) : System
type System.Type
keyToDefaultTo string
return System

HasOpinionAbout() public method

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

SelectHandler() public method

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