C# Class Munq.CreateInstanceDelegateFactory

This class provides a method to build a delegate to create a specified type. It is used by Register<TType, TImp>() to build the Func<IDependencyResolver, TImp> need to create the instance to be returned. Also used by the Resolve methods if the type requested is a class, not an interface, and is not currently Registered in the container.
Afficher le fichier Open project: volkanceylan/Serenity Class Usage Examples

Méthodes publiques

Méthode Description
Create ( Type tImpl ) : object>.Func

Build a delegate to return an instance of the specified type given an instance of IocContainer. Finds the public constructor with the most parameters. The resulting method calls the container to resolve each parameter in the constructor.

Private Methods

Méthode Description
BuildExpression ( Type type, System.Linq.Expressions.ParameterExpression container ) : NewExpression
GetConstructorInfo ( Type implType ) : ConstructorInfo

Method Details

Create() public static méthode

Build a delegate to return an instance of the specified type given an instance of IocContainer. Finds the public constructor with the most parameters. The resulting method calls the container to resolve each parameter in the constructor.
public static Create ( Type tImpl ) : object>.Func
tImpl System.Type The class to be resolved.
Résultat object>.Func