Table of Contents

Class SingleServiceProvider

Namespace
Acuit.Pinpoint.Workflows
Assembly
Acuit.Pinpoint.Workflows.dll

A service provider that provides a single service.

public class SingleServiceProvider : IServiceProvider
Inheritance
SingleServiceProvider
Implements
Derived
Inherited Members
Extension Methods

Remarks

Note that the service type must match exactly; added service types that are base types of the requested service type will not be matched.

Constructors

SingleServiceProvider(Type, object)

Initializes a new instance of the SingleServiceProvider class.

public SingleServiceProvider(Type serviceType, object serviceInstance)

Parameters

serviceType Type

The service type.

serviceInstance object

The service instance.

Remarks

Note that the service type must match exactly; added service types that are base types of the requested service type will not be matched.

Exceptions

ArgumentNullException

serviceType is null.

ArgumentNullException

serviceInstance is null.

Methods

GetService(Type)

Gets the service object of the specified type.

public object GetService(Type serviceType)

Parameters

serviceType Type

An object that specifies the type of service object to get.

Returns

object

A service object of type serviceType, or null if there is no service object of type serviceType.

Remarks

Note that the service type must match exactly; added service types that are base types of the requested service type will not be matched.