메소드 | 설명 | |
---|---|---|
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.
|
|
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.
|
|
UnityDependencyResolver ( IUnityContainer container ) : System |
Initialization
|
public GetService ( |
||
serviceType | ||
리턴 | object |
public GetServices ( |
||
serviceType | ||
리턴 | IEnumerable |
public UnityDependencyResolver ( IUnityContainer container ) : System | ||
container | IUnityContainer | |
리턴 | System |