Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more

EPiServer.ServiceLocation namespace

Version InfoThis topic applies to Episerver.ConnectForMarketingAutomation 4.0.0 and lower. For later versions, see Sample Connector - IMarketingConnector

ServiceConfigurationContext Class 

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

  • Inheritance hierarchy.
    System.Object
      EPiServer.ServiceLocation.ServiceConfigurationContext
  • Namespace. EPiServer.ServiceLocation
  • Assembly. EPiServer.Framework (in EPiServer.Framework.dll) Version: 9.0.3
  • C# syntax.
    public class ServiceConfigurationContext

The ServiceConfigurationContext type exposes the following members.

Constructor 

Creates an instance of the ServiceConfigurationContext class.

  • Namespace. EPiServer.ServiceLocation
  • Assembly. EPiServer.Framework (in EPiServer.Framework.dll) Version: 9.0.3
  • C# syntax.
    public ServiceConfigurationContext(
      HostType hostType,
      IContainer container
    )
  • Parameters.
    • hostType. Type: HostType
      Type of the host.
    • container. Type: IContainer
      The IoC container to expose.

Properties 

ServiceConfigurationContext.Container property 

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

  • Namespace. EPiServer.ServiceLocation
  • Assembly. EPiServer.Framework (in EPiServer.Framework.dll) Version: 9.0.3
  • C# syntax.
    public IContainer Container { get; }
  • Property value. Type: IContainer

ServiceConfigurationContext.HostType property 

Gets the type of the host.

  • Namespace. EPiServer.ServiceLocation
  • Assembly. EPiServer.Framework (in EPiServer.Framework.dll) Version: 9.0.3
  • C# syntax.
    public HostType HostType { get; }
  • Property value. Type: HostType

Event 

ServiceConfigurationContext.ConfigurationComplete event 

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

  • Namespace. EPiServer.ServiceLocation
  • Assembly. EPiServer.Framework (in EPiServer.Framework.dll) Version: 9.0.3
  • C# syntax.
    public event EventHandler<ServiceConfigurationEventArgs> ConfigurationComplete
  • Value. TypeSystem. EventHandler< ServiceConfigurationEventArgs>

Last updated: Dec 10, 2015