Interface IServiceLocator
- Namespace
- Dynamicweb.Extensibility
- Assembly
- Dynamicweb.Core.dll
The generic Service Locator interface. This interface is used to retrieve services (instances identified by type and optional name) from a container.
- Inherited Members
Methods
GetAllInstances(Type)
Get all instances of the given serviceType
currently
registered in the container.
Parameters
serviceType
TypeType of object requested.
Returns
- IEnumerable<object>
A sequence of instances of the requested
serviceType
.
Exceptions
- Activation
Exception if there is are errors resolving the service instance.
GetAllInstances<TService>()
Get all instances of the given TService
currently
registered in the container.
Returns
- IEnumerable<TService>
A sequence of instances of the requested
TService
.
Type Parameters
TService
Type of object requested.
Exceptions
- Activation
Exception if there is are errors resolving the service instance.
GetInstance(Type)
Get an instance of the given serviceType
.
Parameters
serviceType
TypeType of object requested.
Returns
- object
The requested service instance.
Exceptions
- Activation
Exception if there is an error resolving the service instance.
GetInstance<TService>()
Get an instance of the given TService
.
Returns
- TService
The requested service instance.
Type Parameters
TService
Type of object requested.
Exceptions
- Activation
Exception if there is are errors resolving the service instance.