C# Класс Castle.Facilities.TypedFactory.DefaultTypedFactoryComponentSelector

Наследование: ITypedFactoryComponentSelector
Показать файл Открыть проект

Открытые методы

Метод Описание
DefaultTypedFactoryComponentSelector ( bool getMethodsResolveByName = true, bool fallbackToResolveByTypeIfNameNotFound = false ) : System
SelectComponent ( MethodInfo method, Type type, object arguments ) : Func

Защищенные методы

Метод Описание
BuildFactoryComponent ( MethodInfo method, string componentName, Type componentType, IDictionary additionalArguments ) : Func

Builds TypedFactoryComponentResolver for given call. By default if componentType is a collection returns factory calling IKernel.ResolveAll(System.Type) on collection's item type, otherwise standard TypedFactoryComponentResolver.

DefaultTypedFactoryComponentSelector ( ) : System
GetArguments ( MethodInfo method, object arguments ) : IDictionary

Selects arguments to be passed to resolution pipeline. By default passes all given arguments keyed by names of their corresponding method parameters.

GetComponentName ( MethodInfo method, object arguments ) : string

Selects name of the component to resolve. If method Name is GetFoo returns "Foo", otherwise null.

GetComponentType ( MethodInfo method, object arguments ) : Type

Selects type of the component to resolve. Uses method return type.

Описание методов

BuildFactoryComponent() защищенный Метод

Builds TypedFactoryComponentResolver for given call. By default if componentType is a collection returns factory calling IKernel.ResolveAll(System.Type) on collection's item type, otherwise standard TypedFactoryComponentResolver.
protected BuildFactoryComponent ( MethodInfo method, string componentName, Type componentType, IDictionary additionalArguments ) : Func
method System.Reflection.MethodInfo
componentName string
componentType System.Type
additionalArguments IDictionary
Результат Func

DefaultTypedFactoryComponentSelector() защищенный Метод

protected DefaultTypedFactoryComponentSelector ( ) : System
Результат System

DefaultTypedFactoryComponentSelector() публичный Метод

public DefaultTypedFactoryComponentSelector ( bool getMethodsResolveByName = true, bool fallbackToResolveByTypeIfNameNotFound = false ) : System
getMethodsResolveByName bool If set to true, all methods with names like 'GetSomething' will try to resolve by name component 'something'. Defaults to true.
fallbackToResolveByTypeIfNameNotFound bool If set to true, will fallback to resolving by type, if can not find component with specified name. This property is here for backward compatibility. It is recommended not to use it. Defaults to false.
Результат System

GetArguments() защищенный Метод

Selects arguments to be passed to resolution pipeline. By default passes all given arguments keyed by names of their corresponding method parameters.
protected GetArguments ( MethodInfo method, object arguments ) : IDictionary
method System.Reflection.MethodInfo
arguments object
Результат IDictionary

GetComponentName() защищенный Метод

Selects name of the component to resolve. If method Name is GetFoo returns "Foo", otherwise null.
protected GetComponentName ( MethodInfo method, object arguments ) : string
method System.Reflection.MethodInfo
arguments object
Результат string

GetComponentType() защищенный Метод

Selects type of the component to resolve. Uses method return type.
protected GetComponentType ( MethodInfo method, object arguments ) : Type
method System.Reflection.MethodInfo
arguments object
Результат System.Type

SelectComponent() публичный Метод

public SelectComponent ( MethodInfo method, Type type, object arguments ) : Func
method System.Reflection.MethodInfo
type System.Type
arguments object
Результат Func