Class ExpirationExtensions

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
TypeNameDescription
Expirationexpiration

Expiration, may be null.

IClockclock

IClock to use for deadline calculation.

Returns
TypeDescription
Nullable<DateTime>

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