C# Class Paralect.Extensions.Mvc.UnityDependencyResolver

Implementation of MVC 3 IDependencyResolver for MS Unity 2.0
Inheritance: IDependencyResolver
Datei anzeigen Open project: paralect/Paralect.Extensions.Mvc

Public Methods

Method Description
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

Method Details

GetService() public method

"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
return object

GetServices() public method

"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
return IEnumerable

UnityDependencyResolver() public method

Initialization
public UnityDependencyResolver ( IUnityContainer container ) : System
container IUnityContainer
return System