MigrationsServiceProviderExtensions

Provides helper extension methods for the IServiceProvider

Namespace:
KpokPatagon.Data.Migrations.DependencyInjection
Type:
Class
Public:
Yes
Protected:
No
Sealed:
Yes
Abstract:
Yes

Methods

GetScriptExecutorRequiredService

Gets from the dependency injection container an IScriptExecutorService service with the specified name.

Signature:
public IScriptExecutorService GetScriptExecutorRequiredService(provider, name)
Returns

An IScriptExecutorService service for the specified name.

Parameters
Name Type Summary
provider IServiceProvider The IServiceProvider.
name String The name of the service to get.
Exceptions
Type Summary
ArgumentException Thrown when name is null or empty.
InvalidOperationException Thrown when there is no ITableDscService service with the specified name.

GetTableDscRequiredService

Gets from the dependency injection container an ITableDscService service with the specified name.

Signature:
public ITableDscService GetTableDscRequiredService(provider, name)
Returns

An ITableDscService service for the specified name.

Parameters
Name Type Summary
provider IServiceProvider The IServiceProvider.
name String The name of the service to get.
Exceptions
Type Summary
ArgumentException Thrown when name is null or empty.
InvalidOperationException Thrown when there is no ITableDscService service with the specified name.