ServiceLocator.GetService<T> Method |
Gets a service implementation.
Namespace: PostSharp.Patterns.Utilities
Assembly: PostSharp.Patterns.Common (in PostSharp.Patterns.Common.dll) Version: 2023.0.3.0 (2023.0.3.0)
C#
public static T GetService<T>() where T : class
Type Parameters
- T
- Type of the requested service interface.
Return Value
Type: TAn implementation of T, or null if no such service has been registered.