PostSharp.ILAPI ReferencePost­Sharp.​ExtensibilityIProjectGet­Service
Open sandboxFocus

IProject.GetService Method

GetService<T>(Boolean)

Gets a build-time service exposed by PostSharp.

Declaration
T GetService<T>(bool throwing = true)
where T : class, IService
Parameters
Type Name Description
System.Boolean throwing

true whether an exception should be thrown in case the service cannot be acquired, otherwise false. The default value is true.

Returns
Type Description
T

The service T, or null if the service could not be acquired and throwing was set to false.

Type Parameters
Name Description
T

An interface derived from IService.