Click or drag to resize

ServiceHelper Methods

The ServiceHelper type exposes the following members.

Methods
  NameDescription
Public methodStatic memberGetOptionalServiceT
Gets a service from a given service provider, or if the service does not exist.
Public methodStatic memberGetServiceT(IServiceProvider)
Gets a service from a given service provider, throwing a ServiceNotAvailableException if the service is not available.
Public methodStatic memberGetServiceT(IServiceProvider, Boolean)
Gets a service from a given service provider.
Public methodStatic memberGetServiceT(IServiceProvider, String)
Gets a service from a given service provider, throwing a ServiceNotAvailableException if the service is not available.
Public methodStatic memberHasService
Checks whether a service provider has a given service.
Public methodStatic memberLocateService(Type, Object)
Convenience method for implementing IServiceProvider objects. If candidate is an instance of serviceType, returns candidate, otherwise returns .
Public methodStatic memberLocateServiceT(Type, Object, T)
Convenience method for implementing IServiceProvider objects. If candidate is an instance of serviceType, returns candidate. Otherwise, checks additional IServiceProvider objects for any that return a non-null result for serviceType. Otherwise, returns .
Public methodStatic memberLocateServiceT(Type, Object, IEnumerableT)
Convenience method for implementing IServiceProvider objects. If candidate is an instance of serviceType, returns candidate. Otherwise, checks additional IServiceProvider objects for any that return a non-null result for serviceType. Otherwise, returns .
Top
See Also