PostSharp 6.6 / / Post­Sharp Documentation / 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: 6.6.14.0 (6.6.14.0)
Syntax
C#
public static void RegisterService<T>(
	T service
)
where T : class

Parameters

service
Type: T
Service implementation.

Type Parameters

T
Type of the service interface.
See Also