November Happy Hour will be moved to Thursday December 5th.

Class ServiceConfigurationContext

This class is used by the IConfigurableModule to expose the IoC container for configuration.

Inheritance
System.Object
ServiceConfigurationContext
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.ServiceLocation
Assembly: EPiServer.Framework.dll
Version: 10.10.4
Syntax
public class ServiceConfigurationContext

Constructors

ServiceConfigurationContext(HostType, IServiceConfigurationProvider)

Creates an instance of the ServiceConfigurationContext class.

Declaration
public ServiceConfigurationContext(HostType hostType, IServiceConfigurationProvider services)
Parameters
Type Name Description
HostType hostType

Type of the host.

IServiceConfigurationProvider services

The IoC container to expose.

ServiceConfigurationContext(HostType, IContainer)

Creates an instance of the ServiceConfigurationContext class.

Declaration
[Obsolete("Use alternative constructor")]
public ServiceConfigurationContext(HostType hostType, IContainer container)
Parameters
Type Name Description
HostType hostType

Type of the host.

StructureMap.IContainer container

The IoC container to expose.

Properties

Container

The default inversion of control container used by episerver modules. Use this property to configure services into the container.

Declaration
[Obsolete("Use extension method StructureMap instead")]
public IContainer Container { get; }
Property Value
Type Description
StructureMap.IContainer

HostType

Gets the type of the host.

Declaration
public HostType HostType { get; }
Property Value
Type Description
HostType

Services

Provider for the registered inversion of control container. Use this property to configure services into the container.

Declaration
public IServiceConfigurationProvider Services { get; }
Property Value
Type Description
IServiceConfigurationProvider

Events

ConfigurationComplete

ConfigurationComplete is raised when all ConfigureContainer(ServiceConfigurationContext) has been called.

Declaration
public event EventHandler<ServiceConfigurationEventArgs> ConfigurationComplete
Event Type
Type Description
System.EventHandler<ServiceConfigurationEventArgs>

Extension Methods