Namespace EPiServer.ServiceLocation

Classes

ActivationException

The standard exception thrown when a ServiceLocator has an error in resolving an object.

ServiceConfigurationAttribute

Marks a type that is automatically registered as a service by the EPiServer initialization system.

ServiceConfigurationContext

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

ServiceConfigurationEventArgs

Event argument used in event ConfigurationComplete.

ServiceContainerInitialization

Initializes the IoC container. To use ServiceLocator in an initializable module add ModuleDependencyAttribute from your initializable module to ServiceContainerInitialization.

ServiceLocationHelper

A class that helps resolving services part of the public API. Module namespaces registers extensions to this class to indicate that a service is part of the public API. Using one of these namespaces reveals the API. Instances of this class are available from key base classes and APIs.

ServiceLocator

This class provides the ambient container for this application. If your framework defines such an ambient container, use ServiceLocator.Current to get it.

ServiceLocatorImplBase

This class is a helper that provides a default implementation for most of the methods of IServiceLocator.

ServicePlugInAttributeBase

Convenience base class for attributes configuring plugin services.

StructureMapServiceLocator

Structs

Injected<T>

Marks a property for property injection by the IoC container. When a class uses properties of this type is constructed via the IoC container or BuildUp is called properties of this type are injected by the system. For objects constructed maually via new the service is located using the global service locator object.

InjectedCollection<T>

Marks a property for property injection by the IoC container. When a class uses properties of this type is constructed via the IoC container or BuildUp is called properties of this type are injected by the system. For objects constructed maually via new the services are located using the global service locator object.

Interfaces

IConfigurableModule

Interface you can implement as part of the EPiServer Framework initialization chain. ConfigureContainer is called on all IInitializableModule before initialization begins. This allows modification of the container before service instances are created during initialization.

IServiceConfiguration

When implemented by an attribute, this interface controls how the decorated class is registered in the inversion of control container.

IServiceLocator

The generic Service Locator interface. This interface is used to retrieve services (instances identified by type and optional name) from a container.

Enums

ServiceInstanceScope

Scope of service instances.

Delegates

ServiceAccessor<TService>

Represents a method used to resolve a service at runtime. During initializing a typed accessor is registered for each service configured using ServiceConfigurationAttribute.

ServiceCollectionAccessor<TService>

Represents a method used to resolve all services at runtime. During initializing a typed accessor is registered for each service configured using ServiceConfigurationAttribute.

ServiceLocatorProvider

This delegate type is used to provide a method that will return the current container. Used with the ServiceLocator static accessor class.