IServiceLocator.GetService<T> Method |
Gets a build-time service exposed by PostSharp.
Namespace: PostSharp.Extensibility
Assembly: PostSharp (in PostSharp.dll) Version: 6.10.10.0 (6.10.10.0)
C#
T GetService<T>( bool throwing = true ) where T : class, IService
Parameters
- throwing (Optional)
- Type: System.Boolean
true whether an exception should be thrown in case the service cannot be acquired, otherwise false. The default value is true.
Type Parameters
- T
- An interface derived from IService.
Return Value
Type: TThe service T, or null if the service could not be acquired and throwing was set to false.