C# Class Icing.Web.Unity.UnityDependencyResolver

Provides methods that simplify service location and dependency resolution with a Unity container backing.
Inheritance: System.Web.Mvc.IDependencyResolver, System.Web.Http.Dependencies.IDependencyResolver
Mostrar archivo Open project: benallred/Icing Class Usage Examples

Public Methods

Method Description
BeginScope ( ) : IDependencyScope

Starts a resolution scope.

Dispose ( ) : void

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

GetService ( Type serviceType ) : object

Resolves singly registered services that support arbitrary object creation.

GetServices ( Type serviceType ) : IEnumerable

Resolves multiply registered services.

UnityDependencyResolver ( IUnityContainer unityContainer ) : System

Initializes a new instance of the UnityDependencyResolver class.

Method Details

BeginScope() public method

Starts a resolution scope.
public BeginScope ( ) : IDependencyScope
return IDependencyScope

Dispose() public method

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public Dispose ( ) : void
return void

GetService() public method

Resolves singly registered services that support arbitrary object creation.
public GetService ( Type serviceType ) : object
serviceType System.Type The type of the requested service or object.
return object

GetServices() public method

Resolves multiply registered services.
public GetServices ( Type serviceType ) : IEnumerable
serviceType System.Type The type of the requested services.
return IEnumerable

UnityDependencyResolver() public method

Initializes a new instance of the UnityDependencyResolver class.
is null.
public UnityDependencyResolver ( IUnityContainer unityContainer ) : System
unityContainer IUnityContainer The unity container.
return System