public static class ServiceCollectionExtensionsReference documentation and code samples for the Grafeas v1 API class ServiceCollectionExtensions.
Static class to provide extension methods to configure API clients.
Namespace
Microsoft.Extensions.DependencyInjectionAssembly
Grafeas.V1.dll
Methods
AddGrafeasClient(IServiceCollection, Action<GrafeasClientBuilder>)
public static IServiceCollection AddGrafeasClient(this IServiceCollection services, Action<GrafeasClientBuilder> action = null)Adds a singleton GrafeasClient to services.
| Parameters | |
|---|---|
| Name | Description |
services |
IServiceCollectionThe service collection to add the client to. The services are used to configure the client when requested. |
action |
ActionGrafeasClientBuilderAn optional action to invoke on the client builder. This is invoked before services from
|
| Returns | |
|---|---|
| Type | Description |
IServiceCollection |
|
AddGrafeasClient(IServiceCollection, Action<IServiceProvider, GrafeasClientBuilder>)
public static IServiceCollection AddGrafeasClient(this IServiceCollection services, Action<IServiceProvider, GrafeasClientBuilder> action)Adds a singleton GrafeasClient to services.
| Parameters | |
|---|---|
| Name | Description |
services |
IServiceCollectionThe service collection to add the client to. The services are used to configure the client when requested. |
action |
ActionSystem.IServiceProviderGrafeasClientBuilderAn optional action to invoke on the client builder. This is invoked before services from
|
| Returns | |
|---|---|
| Type | Description |
IServiceCollection |
|