C# Class Cedar.Framework.Common.Client.WebAPI.ServiceLocatableDependencyResolver

A custom DependencyResolver which uses ServiceLocator to acticvate service.
Inheritance: IDependencyResolver, IDependencyScope, IDisposable
Show file Open project: Chinaccn/surfboard

Public Methods

Method Description
BeginScope ( ) : IDependencyScope

Begins the scope.

Dispose ( ) : void

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

GetService ( Type serviceType ) : object

Gets the service.

GetServices ( Type serviceType ) : IEnumerable

Gets the services.

ServiceLocatableDependencyResolver ( IServiceLocator serviceLocator ) : System

Initializes a new instance of the ServiceLocatableDependencyResolver class.

ServiceLocatableDependencyResolver ( string serviceLocatorName = null ) : System

Initializes a new instance of the ServiceLocatableDependencyResolver class.

Private Methods

Method Description
AddDisposableService ( object servie ) : void

Method Details

BeginScope() public method

Begins the 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

Gets the service.
public GetService ( Type serviceType ) : object
serviceType System.Type Type of the service.
return object

GetServices() public method

Gets the services.
public GetServices ( Type serviceType ) : IEnumerable
serviceType System.Type Type of the service.
return IEnumerable

ServiceLocatableDependencyResolver() public method

Initializes a new instance of the ServiceLocatableDependencyResolver class.
public ServiceLocatableDependencyResolver ( IServiceLocator serviceLocator ) : System
serviceLocator IServiceLocator The service locator.
return System

ServiceLocatableDependencyResolver() public method

Initializes a new instance of the ServiceLocatableDependencyResolver class.
public ServiceLocatableDependencyResolver ( string serviceLocatorName = null ) : System
serviceLocatorName string Name of the service locator.
return System