4.10.0 (latest) 4.8.0 4.4.0 4.3.1 4.2.0 4.0.0 3.2.0

    public static class ExpirationExtensions

Extension methods for [Expiration](https://docs.cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Expiration.md.txt).

## Inheritance

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

## 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.Api.Gax](https://docs.cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.md.txt)

## Assembly

Google.Api.Gax.dll

## Methods

### CalculateDeadline(Expiration, IClock)

    public static DateTime? CalculateDeadline(this Expiration expiration, IClock clock)

Calculate a deadline from an [Expiration](https://docs.cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Expiration.md.txt) and a [IClock](https://docs.cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.IClock.md.txt).

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `expiration` | `Expiration` [Expiration](https://docs.cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Expiration.md.txt), may be null. |
| `clock` | `IClock` [IClock](https://docs.cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.IClock.md.txt) to use for deadline calculation. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `DateTime` | The calculated absolute deadline, or null if no deadline should be used. |