Try our conversational search powered by Generative AI!

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: 9.12.2
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
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

NOTE: This is a pre-release API that is UNSTABLE and might not satisfy the compatibility requirements as denoted by its associated normal version. The default inversion of control container used by episerver modules. 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