C# Класс 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.
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
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.

Приватные методы

Метод Описание
BuildExpression ( Type type, System.Linq.Expressions.ParameterExpression container ) : NewExpression
GetConstructorInfo ( Type implType ) : ConstructorInfo

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

Create() публичный статический Метод

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.
Результат object>.Func