PostSharpAPI ReferencePost­Sharp.​Patterns.​UtilitiesService­LocatorGet­Service
Open sandboxFocus

ServiceLocator.GetService Method

GetService<T>()

Gets a service implementation.

Declaration
public static T GetService<T>()
where T : class
Returns
Type Description
T

An implementation of T, or null if no such service has been registered.

Type Parameters
Name Description
T

Type of the requested service interface.