C# Класс Paralect.Extensions.Mvc.UnityDependencyResolver

Implementation of MVC 3 IDependencyResolver for MS Unity 2.0
Наследование: IDependencyResolver
Показать файл Открыть проект

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

Метод Описание
GetService ( Type serviceType ) : object

"Implementers should return null when the service cannot be found. Use GetServices(Type) to return multiple services." (C) http://msdn.microsoft.com/en-us/library/system.web.mvc.idependencyresolver.getservice(v=VS.98).aspx We can check for availability of such service in container, but i don't doing it to simplify configuration for container, views, models, actions, filters etc... Simply speaking we are always using Unity to instantiate new object.

GetServices ( Type serviceType ) : IEnumerable

"Implementers should return an empty collection when no service can be found. The ASP.NET MVC framework will generate a run-time error when implementations throw an exception or return null." (C) http://msdn.microsoft.com/en-us/library/system.web.mvc.idependencyresolver.getservices(v=VS.98).aspx We can check for availability of such services in container, but i don't doing it to simplify configuration for container, views, models, actions, filters etc... Simply speaking we are always using Unity to instantiate new object.

UnityDependencyResolver ( IUnityContainer container ) : System

Initialization

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

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

"Implementers should return null when the service cannot be found. Use GetServices(Type) to return multiple services." (C) http://msdn.microsoft.com/en-us/library/system.web.mvc.idependencyresolver.getservice(v=VS.98).aspx We can check for availability of such service in container, but i don't doing it to simplify configuration for container, views, models, actions, filters etc... Simply speaking we are always using Unity to instantiate new object.
public GetService ( Type serviceType ) : object
serviceType System.Type
Результат object

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

"Implementers should return an empty collection when no service can be found. The ASP.NET MVC framework will generate a run-time error when implementations throw an exception or return null." (C) http://msdn.microsoft.com/en-us/library/system.web.mvc.idependencyresolver.getservices(v=VS.98).aspx We can check for availability of such services in container, but i don't doing it to simplify configuration for container, views, models, actions, filters etc... Simply speaking we are always using Unity to instantiate new object.
public GetServices ( Type serviceType ) : IEnumerable
serviceType System.Type
Результат IEnumerable

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

Initialization
public UnityDependencyResolver ( IUnityContainer container ) : System
container IUnityContainer
Результат System