Class StructureMapServiceLocator
Inherited Members
Namespace: EPiServer.ServiceLocation
Assembly: EPiServer.Framework.dll
Version: 9.12.2Syntax
public class StructureMapServiceLocator : ServiceLocatorImplBase, IServiceLocator, IServiceProvider
Constructors
StructureMapServiceLocator(IContainer)
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 |