Click or drag to resize

ServiceHelperHasService Method

Checks whether a service provider has a given service.

Namespace:  AGI.Foundation.Infrastructure
Assembly:  AGI.Foundation.Core (in AGI.Foundation.Core.dll) Version: 24.2.419.0 (24.2.419.0)
Syntax
public static bool HasService(
	IServiceProvider serviceProvider,
	Type serviceType
)

Parameters

serviceProvider
Type: SystemIServiceProvider
The service provider from which to obtain the service.
serviceType
Type: SystemType
The type of the service that is requested.

Return Value

Type: Boolean
if the service provider returns a non-null service of the given type.
Exceptions
ExceptionCondition
ArgumentNullException Thrown when serviceProvider or serviceType is .
See Also