C# Class BuildIt.Autofac.AutofacServiceLocator

Autofac implementation of the Microsoft CommonServiceLocator.
Inheritance: ServiceLocatorImplBase
Datei anzeigen Open project: builttoroam/BuildIt

Public Methods

Method Description
AutofacServiceLocator ( IComponentContext container ) : Autofac

Initializes a new instance of the AutofacServiceLocator class.

Protected Methods

Method Description
DoGetAllInstances ( Type serviceType ) : IEnumerable

Resolves all requested service instances.

DoGetInstance ( Type serviceType, string key ) : object

Resolves the requested service instance.

Method Details

AutofacServiceLocator() public method

Initializes a new instance of the AutofacServiceLocator class.
/// Thrown if is . ///
public AutofacServiceLocator ( IComponentContext container ) : Autofac
container IComponentContext /// The from which services /// should be located. ///
return Autofac

DoGetAllInstances() protected method

Resolves all requested service instances.
/// Thrown if is . ///
protected DoGetAllInstances ( Type serviceType ) : IEnumerable
serviceType System.Type Type of instance requested.
return IEnumerable

DoGetInstance() protected method

Resolves the requested service instance.
/// Thrown if is . ///
protected DoGetInstance ( Type serviceType, string key ) : object
serviceType System.Type Type of instance requested.
key string Name of registered service you want. May be .
return object