2.5.0 (latest) 2.4.0 2.3.0 2.2.0 2.1.0 2.0.0 1.4.0 1.3.0 1.2.0 1.1.0 1.0.0

    public static class ServiceCollectionExtensions

Reference documentation and code samples for the App Engine v1 API class ServiceCollectionExtensions.

Static class to provide extension methods to configure API clients.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> ServiceCollectionExtensions

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Microsoft.Extensions.DependencyInjection](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AppEngine.V1/latest/Microsoft.Extensions.DependencyInjection.md.txt)

## Assembly

Google.Cloud.AppEngine.V1.dll

## Methods

### AddApplicationsClient(IServiceCollection, Action\<ApplicationsClientBuilder\>)

    public static IServiceCollection AddApplicationsClient(this IServiceCollection services, Action<ApplicationsClientBuilder> action = null)

Adds a singleton [ApplicationsClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AppEngine.V1/latest/Google.Cloud.AppEngine.V1.ApplicationsClient.md.txt) to `services`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `services` | `IServiceCollection` The service collection to add the client to. The services are used to configure the client when requested. |
| `action` | `ActionApplicationsClientBuilder` An optional action to invoke on the client builder. This is invoked before services from `services` are used. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `IServiceCollection` |   |

### AddApplicationsClient(IServiceCollection, Action\<IServiceProvider, ApplicationsClientBuilder\>)

    public static IServiceCollection AddApplicationsClient(this IServiceCollection services, Action<IServiceProvider, ApplicationsClientBuilder> action)

Adds a singleton [ApplicationsClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AppEngine.V1/latest/Google.Cloud.AppEngine.V1.ApplicationsClient.md.txt) to `services`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `services` | `IServiceCollection` The service collection to add the client to. The services are used to configure the client when requested. |
| `action` | `ActionSystem.IServiceProviderApplicationsClientBuilder` An optional action to invoke on the client builder. This is invoked before services from `services` are used. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `IServiceCollection` |   |

### AddAuthorizedCertificatesClient(IServiceCollection, Action\<AuthorizedCertificatesClientBuilder\>)

    public static IServiceCollection AddAuthorizedCertificatesClient(this IServiceCollection services, Action<AuthorizedCertificatesClientBuilder> action = null)

Adds a singleton [AuthorizedCertificatesClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AppEngine.V1/latest/Google.Cloud.AppEngine.V1.AuthorizedCertificatesClient.md.txt) to `services`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `services` | `IServiceCollection` The service collection to add the client to. The services are used to configure the client when requested. |
| `action` | `ActionAuthorizedCertificatesClientBuilder` An optional action to invoke on the client builder. This is invoked before services from `services` are used. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `IServiceCollection` |   |

### AddAuthorizedCertificatesClient(IServiceCollection, Action\<IServiceProvider, AuthorizedCertificatesClientBuilder\>)

    public static IServiceCollection AddAuthorizedCertificatesClient(this IServiceCollection services, Action<IServiceProvider, AuthorizedCertificatesClientBuilder> action)

Adds a singleton [AuthorizedCertificatesClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AppEngine.V1/latest/Google.Cloud.AppEngine.V1.AuthorizedCertificatesClient.md.txt) to `services`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `services` | `IServiceCollection` The service collection to add the client to. The services are used to configure the client when requested. |
| `action` | `ActionSystem.IServiceProviderAuthorizedCertificatesClientBuilder` An optional action to invoke on the client builder. This is invoked before services from `services` are used. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `IServiceCollection` |   |

### AddAuthorizedDomainsClient(IServiceCollection, Action\<AuthorizedDomainsClientBuilder\>)

    public static IServiceCollection AddAuthorizedDomainsClient(this IServiceCollection services, Action<AuthorizedDomainsClientBuilder> action = null)

Adds a singleton [AuthorizedDomainsClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AppEngine.V1/latest/Google.Cloud.AppEngine.V1.AuthorizedDomainsClient.md.txt) to `services`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `services` | `IServiceCollection` The service collection to add the client to. The services are used to configure the client when requested. |
| `action` | `ActionAuthorizedDomainsClientBuilder` An optional action to invoke on the client builder. This is invoked before services from `services` are used. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `IServiceCollection` |   |

### AddAuthorizedDomainsClient(IServiceCollection, Action\<IServiceProvider, AuthorizedDomainsClientBuilder\>)

    public static IServiceCollection AddAuthorizedDomainsClient(this IServiceCollection services, Action<IServiceProvider, AuthorizedDomainsClientBuilder> action)

Adds a singleton [AuthorizedDomainsClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AppEngine.V1/latest/Google.Cloud.AppEngine.V1.AuthorizedDomainsClient.md.txt) to `services`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `services` | `IServiceCollection` The service collection to add the client to. The services are used to configure the client when requested. |
| `action` | `ActionSystem.IServiceProviderAuthorizedDomainsClientBuilder` An optional action to invoke on the client builder. This is invoked before services from `services` are used. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `IServiceCollection` |   |

### AddDomainMappingsClient(IServiceCollection, Action\<DomainMappingsClientBuilder\>)

    public static IServiceCollection AddDomainMappingsClient(this IServiceCollection services, Action<DomainMappingsClientBuilder> action = null)

Adds a singleton [DomainMappingsClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AppEngine.V1/latest/Google.Cloud.AppEngine.V1.DomainMappingsClient.md.txt) to `services`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `services` | `IServiceCollection` The service collection to add the client to. The services are used to configure the client when requested. |
| `action` | `ActionDomainMappingsClientBuilder` An optional action to invoke on the client builder. This is invoked before services from `services` are used. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `IServiceCollection` |   |

### AddDomainMappingsClient(IServiceCollection, Action\<IServiceProvider, DomainMappingsClientBuilder\>)

    public static IServiceCollection AddDomainMappingsClient(this IServiceCollection services, Action<IServiceProvider, DomainMappingsClientBuilder> action)

Adds a singleton [DomainMappingsClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AppEngine.V1/latest/Google.Cloud.AppEngine.V1.DomainMappingsClient.md.txt) to `services`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `services` | `IServiceCollection` The service collection to add the client to. The services are used to configure the client when requested. |
| `action` | `ActionSystem.IServiceProviderDomainMappingsClientBuilder` An optional action to invoke on the client builder. This is invoked before services from `services` are used. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `IServiceCollection` |   |

### AddFirewallClient(IServiceCollection, Action\<FirewallClientBuilder\>)

    public static IServiceCollection AddFirewallClient(this IServiceCollection services, Action<FirewallClientBuilder> action = null)

Adds a singleton [FirewallClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AppEngine.V1/latest/Google.Cloud.AppEngine.V1.FirewallClient.md.txt) to `services`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `services` | `IServiceCollection` The service collection to add the client to. The services are used to configure the client when requested. |
| `action` | `ActionFirewallClientBuilder` An optional action to invoke on the client builder. This is invoked before services from `services` are used. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `IServiceCollection` |   |

### AddFirewallClient(IServiceCollection, Action\<IServiceProvider, FirewallClientBuilder\>)

    public static IServiceCollection AddFirewallClient(this IServiceCollection services, Action<IServiceProvider, FirewallClientBuilder> action)

Adds a singleton [FirewallClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AppEngine.V1/latest/Google.Cloud.AppEngine.V1.FirewallClient.md.txt) to `services`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `services` | `IServiceCollection` The service collection to add the client to. The services are used to configure the client when requested. |
| `action` | `ActionSystem.IServiceProviderFirewallClientBuilder` An optional action to invoke on the client builder. This is invoked before services from `services` are used. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `IServiceCollection` |   |

### AddInstancesClient(IServiceCollection, Action\<InstancesClientBuilder\>)

    public static IServiceCollection AddInstancesClient(this IServiceCollection services, Action<InstancesClientBuilder> action = null)

Adds a singleton [InstancesClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AppEngine.V1/latest/Google.Cloud.AppEngine.V1.InstancesClient.md.txt) to `services`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `services` | `IServiceCollection` The service collection to add the client to. The services are used to configure the client when requested. |
| `action` | `ActionInstancesClientBuilder` An optional action to invoke on the client builder. This is invoked before services from `services` are used. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `IServiceCollection` |   |

### AddInstancesClient(IServiceCollection, Action\<IServiceProvider, InstancesClientBuilder\>)

    public static IServiceCollection AddInstancesClient(this IServiceCollection services, Action<IServiceProvider, InstancesClientBuilder> action)

Adds a singleton [InstancesClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AppEngine.V1/latest/Google.Cloud.AppEngine.V1.InstancesClient.md.txt) to `services`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `services` | `IServiceCollection` The service collection to add the client to. The services are used to configure the client when requested. |
| `action` | `ActionSystem.IServiceProviderInstancesClientBuilder` An optional action to invoke on the client builder. This is invoked before services from `services` are used. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `IServiceCollection` |   |

### AddServicesClient(IServiceCollection, Action\<ServicesClientBuilder\>)

    public static IServiceCollection AddServicesClient(this IServiceCollection services, Action<ServicesClientBuilder> action = null)

Adds a singleton [ServicesClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AppEngine.V1/latest/Google.Cloud.AppEngine.V1.ServicesClient.md.txt) to `services`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `services` | `IServiceCollection` The service collection to add the client to. The services are used to configure the client when requested. |
| `action` | `ActionServicesClientBuilder` An optional action to invoke on the client builder. This is invoked before services from `services` are used. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `IServiceCollection` |   |

### AddServicesClient(IServiceCollection, Action\<IServiceProvider, ServicesClientBuilder\>)

    public static IServiceCollection AddServicesClient(this IServiceCollection services, Action<IServiceProvider, ServicesClientBuilder> action)

Adds a singleton [ServicesClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AppEngine.V1/latest/Google.Cloud.AppEngine.V1.ServicesClient.md.txt) to `services`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `services` | `IServiceCollection` The service collection to add the client to. The services are used to configure the client when requested. |
| `action` | `ActionSystem.IServiceProviderServicesClientBuilder` An optional action to invoke on the client builder. This is invoked before services from `services` are used. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `IServiceCollection` |   |

### AddVersionsClient(IServiceCollection, Action\<VersionsClientBuilder\>)

    public static IServiceCollection AddVersionsClient(this IServiceCollection services, Action<VersionsClientBuilder> action = null)

Adds a singleton [VersionsClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AppEngine.V1/latest/Google.Cloud.AppEngine.V1.VersionsClient.md.txt) to `services`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `services` | `IServiceCollection` The service collection to add the client to. The services are used to configure the client when requested. |
| `action` | `ActionVersionsClientBuilder` An optional action to invoke on the client builder. This is invoked before services from `services` are used. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `IServiceCollection` |   |

### AddVersionsClient(IServiceCollection, Action\<IServiceProvider, VersionsClientBuilder\>)

    public static IServiceCollection AddVersionsClient(this IServiceCollection services, Action<IServiceProvider, VersionsClientBuilder> action)

Adds a singleton [VersionsClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.AppEngine.V1/latest/Google.Cloud.AppEngine.V1.VersionsClient.md.txt) to `services`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `services` | `IServiceCollection` The service collection to add the client to. The services are used to configure the client when requested. |
| `action` | `ActionSystem.IServiceProviderVersionsClientBuilder` An optional action to invoke on the client builder. This is invoked before services from `services` are used. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `IServiceCollection` |   |