1.73.0 (latest) 1.69.0 1.68.0 1.60.0 1.59.0 1.55.0 1.50.0

    public class ExponentialBackOffInitializer : IConfigurableHttpClientInitializer

An initializer which adds exponential back-off as exception handler and \\ or unsuccessful response handler by
the given [ExponentialBackOffPolicy](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Http.ExponentialBackOffPolicy.md.txt).

## Inheritance

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

## Implements

[IConfigurableHttpClientInitializer](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Http.IConfigurableHttpClientInitializer.md.txt)

## Inherited Members

[object.Equals(object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)) [object.Equals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)) [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.ReferenceEquals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Apis.Http](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Http.md.txt)

## Assembly

Google.Apis.Core.dll

## Constructors

### ExponentialBackOffInitializer(ExponentialBackOffPolicy, Func\<BackOffHandler\>)

    public ExponentialBackOffInitializer(ExponentialBackOffPolicy policy, Func<BackOffHandler> createBackOff)

Constructs a new back-off initializer with the given policy and back-off handler create function.
If `policy` has the [RecommendedOrDefault](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Http.ExponentialBackOffPolicy.md.txt#Google_Apis_Http_ExponentialBackOffPolicy_RecommendedOrDefault) flag set,
the [BackOffHandler](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Http.BackOffHandler.md.txt) will be set for handling both exceptions and HTTP Status codes.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `policy` | `ExponentialBackOffPolicy` |
| `createBackOff` | `FuncBackOffHandler` |

## Methods

### Initialize(ConfigurableHttpClient)

    public void Initialize(ConfigurableHttpClient httpClient)

Initializes a HTTP client after it was created.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `httpClient` | `ConfigurableHttpClient` |

## Extension Method

[Utilities.ThrowIfNull\<T\>(T, string)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Util.Utilities.md.txt#Google_Apis_Util_Utilities_ThrowIfNull__1___0_System_String_)