Class StructureMapServiceLocator
IServiceLocator implementation for StructureMap
Inherited Members
Namespace: EPiServer.ServiceLocation
Assembly: EPiServer.Framework.dll
Version: 10.10.4Syntax
public class StructureMapServiceLocator : ServiceLocatorImplBase, IServiceLocator, IServiceProviderConstructors
StructureMapServiceLocator(IContainer)
Creates a new instance of StructureMapServiceLocator
Declaration
public StructureMapServiceLocator(IContainer container)Parameters
| Type | Name | Description | 
|---|---|---|
| StructureMap.IContainer | container | 
Methods
Buildup(Object)
Satisfies the dependencies of the given service using setter injection.
Declaration
public override void Buildup(object service)Parameters
| Type | Name | Description | 
|---|---|---|
| System.Object | service | The object whose property depdenencies should be set. | 
Overrides
DoGetAllInstances(Type)
When implemented by inheriting classes, this method will do the actual work of resolving all the requested service instances.
Declaration
protected override IEnumerable<object> DoGetAllInstances(Type serviceType)Parameters
| Type | Name | Description | 
|---|---|---|
| System.Type | serviceType | Type of service requested. | 
Returns
| Type | Description | 
|---|---|
| System.Collections.Generic.IEnumerable<System.Object> | Sequence of service instance objects. | 
Overrides
DoGetInstance(Type, String)
When implemented by inheriting classes, this method will do the actual work of resolving the requested service instance.
Declaration
protected override object DoGetInstance(Type serviceType, string key)Parameters
| Type | Name | Description | 
|---|---|---|
| System.Type | serviceType | Type of instance requested. | 
| System.String | key | Name of registered service you want. May be null. | 
Returns
| Type | Description | 
|---|---|
| System.Object | The requested service instance. | 
Overrides
DoTryGetExistingInstance(Type, String, out Object)
When implemented by inheriting classes, this method will look if the instance has been created and that it exists.
Declaration
protected override bool DoTryGetExistingInstance(Type serviceType, string key, out object instance)Parameters
| Type | Name | Description | 
|---|---|---|
| System.Type | serviceType | Type of instance requested. | 
| System.String | key | Name of registered service you want. May be null. | 
| System.Object | instance | The requested service instance or null if it do not exist | 
Returns
| Type | Description | 
|---|---|
| System.Boolean | True if the instance was found | 
