Adds (registers) the service in XServiceManager.

Namespace:  SGP.XUtility
Assembly:  SGP.XUtility (in SGP.XUtility.dll)
Version: 1.2.3019.18718

Syntax

C#
public void AddService(
	IXService service,
	Type serviceType
)

Parameters

service
Type: SGP.XUtility..::.IXService
The service which will be added.
serviceType
Type: System..::.Type
The service type.

Remarks

Registers the service service as a service with the interface serviceType. service must be object which implements an interface serviceType. serviceType must be an interface type under which the service will be registered in XServiceManager. Using GetService(Type) is possible to obtain this interface of given service type.

Exceptions

ExceptionCondition
System..::.ArgumentNullException serviceType is nullNothingnullptra null reference (Nothing in Visual Basic).
System..::.ArgumentNullException service is nullNothingnullptra null reference (Nothing in Visual Basic).

See Also