PostSharp6.7//API Reference/Post­Sharp.​Patterns.​Utilities Namespace/Service­Locator Class

ServiceLocator Class

A basic service locator used by PostSharp Patterns to find global services.
Inheritance Hierarchy
System.Object
  PostSharp.Patterns.Utilities.ServiceLocator

Namespace:  PostSharp.Patterns.Utilities
Assembly:  PostSharp.Patterns.Common (in PostSharp.Patterns.Common.dll) Version: 6.7.10.0 (6.7.10.0)
Syntax
C#
public static class ServiceLocator

The ServiceLocator type exposes the following members.

Methods
  NameDescription
Public methodStatic memberGetService<T>
Gets a service implementation.
Public methodStatic memberRegisterService<T>
Registers a service.
Events
  NameDescription
Public eventStatic memberServiceRegistered
Event raised when a new service is registered.
See Also