C# Class Unity.TypedFactories.Implementation.FactoryInterceptor

Defines an IInterceptor implementation which implements the factory methods, by passing the method arguments by name into a specified concrete type's constructor.
Inheritance: IInterceptor
Mostrar archivo Open project: PombeirP/Unity.TypedFactories

Public Methods

Method Description
FactoryInterceptor ( IUnityContainer container, Type concreteType, string name ) : System

Initializes a new instance of the FactoryInterceptor class.

Protected Methods

Method Description
GetResolverOverridesFor ( IInvocation invocation ) : IEnumerable

Builds a list consisting of one ParameterOverride instance for each argument of the method in invocation.

ResolveArray ( IInvocation invocation ) : void

Resolve an array of objects based on the context described in invocation.

ResolveObject ( IInvocation invocation ) : void

Resolve an object based on the context described in invocation.

Private Methods

Method Description
IInterceptor ( IInvocation invocation ) : void

Method Details

FactoryInterceptor() public method

Initializes a new instance of the FactoryInterceptor class.
/// Thrown when the injected is null. ///
public FactoryInterceptor ( IUnityContainer container, Type concreteType, string name ) : System
container IUnityContainer /// The Unity container. ///
concreteType System.Type /// The concrete class which will be constructed by the factory. ///
name string Name that will be used to request the type.
return System

GetResolverOverridesFor() protected static method

Builds a list consisting of one ParameterOverride instance for each argument of the method in invocation.
protected static GetResolverOverridesFor ( IInvocation invocation ) : IEnumerable
invocation IInvocation /// The invocation details. ///
return IEnumerable

ResolveArray() protected method

Resolve an array of objects based on the context described in invocation.
protected ResolveArray ( IInvocation invocation ) : void
invocation IInvocation The invocation context.
return void

ResolveObject() protected method

Resolve an object based on the context described in invocation.
protected ResolveObject ( IInvocation invocation ) : void
invocation IInvocation The invocation context.
return void