◆ 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.
If it does not exist, but we can create a new instance, then do so. If we cannot create a new instance, 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.