Class ExpirationExtensions (4.2.0)

public static class ExpirationExtensions

Extension methods for Expiration.

Inheritance

Object > ExpirationExtensions

Namespace

Google.Api.Gax

Assembly

Google.Api.Gax.dll

Methods

CalculateDeadline(Expiration, IClock)

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

Calculate a deadline from an Expiration and a IClock.

Parameters
NameDescription
expirationExpiration

Expiration, may be null.

clockIClock

IClock to use for deadline calculation.

Returns
TypeDescription
Nullable<DateTime>

The calculated absolute deadline, or null if no deadline should be used.