C# 클래스 Castle.Facilities.TypedFactory.DefaultTypedFactoryComponentSelector

상속: ITypedFactoryComponentSelector
파일 보기 프로젝트 열기: castleproject/Windsor

공개 메소드들

메소드 설명
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