PostSharp5.0//API Reference/Post­Sharp.​Patterns.​Utilities Namespace/Service­Locator Class/Service­Locator Methods/Service­Locator.​Register­Service(T) Method

ServiceLocator.RegisterService<T> Method

Registers a service.

Namespace:  PostSharp.Patterns.Utilities
Assembly:  PostSharp.Patterns.Common (in PostSharp.Patterns.Common.dll) Version: 5.0.55.0 (5.0.55.0)
Syntax
C#
public static void RegisterService<T>(
	T service
)

Parameters

service
Type: T
Service implementation.

Type Parameters

T
Type of the service interface.
See Also