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
)
Public Shared Function HasService (
serviceProvider As IServiceProvider,
serviceType As Type
) As Boolean
public:
static bool HasService(
IServiceProvider^ serviceProvider,
Type^ serviceType
)
static member HasService :
serviceProvider : IServiceProvider *
serviceType : Type -> bool
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 See Also