\r\n

51Degrees Pipeline .NET  4.3

51Degrees Pipeline for .NET

FiftyOne.Pipeline.Core.Services.FiftyOneServiceProvider Class Reference

Detailed Description

Basic implementation of IServiceProvider.

An instance contains a list of services which can be added to.

Inheritance diagram for FiftyOne.Pipeline.Core.Services.FiftyOneServiceProvider:

[legend]

Collaboration diagram for FiftyOne.Pipeline.Core.Services.FiftyOneServiceProvider:

[legend]

Public Member Functions

void  AddService (object service)
Add a service instance to the provider. More...
object  GetService (Type serviceType)
Get the service from the service collection if it exists, otherwise return null. More...

Member Function Documentation

◆ AddService()

void FiftyOne.Pipeline.Core.Services.FiftyOneServiceProvider.AddService ( object   service )

Add a service instance to the provider.

This builds the collection used to return services from the GetService method.

Parameters
service - Service instance to add.

◆ GetService()

object FiftyOne.Pipeline.Core.Services.FiftyOneServiceProvider.GetService ( Type   serviceType )

Get the service from the service collection if it exists, otherwise return null.

Note that if more than one instance implementing the same service is added to the services, the first will be returned.

Parameters
serviceType - The service type to be returned.
Returns
Service or null.