public sealed class ExpirationExpiration specified by relative timeout or absolute deadline.
Namespace
Google.Api.GaxAssembly
Google.Api.Gax.dll
Properties
Deadline
public DateTime? Deadline { get; }If not null, the absolute deadline of this expiration.
| Property Value | |
|---|---|
| Type | Description |
Nullable<DateTime> |
|
None
public static Expiration None { get; }An Expiration with no timeout or deadline.
| Property Value | |
|---|---|
| Type | Description |
Expiration |
|
Indicates that no expiration is required.
Timeout
public TimeSpan? Timeout { get; }If not null, the relative timeout of this expiration.
| Property Value | |
|---|---|
| Type | Description |
Nullable<TimeSpan> |
|
Type
public ExpirationType Type { get; }What ExpirationType is contained in this Expiration.
| Property Value | |
|---|---|
| Type | Description |
ExpirationType |
|
Methods
FromDeadline(DateTime)
public static Expiration FromDeadline(DateTime deadline)Create an Expiration with an absolute deadline.
| Parameter | |
|---|---|
| Name | Description |
deadline |
DateTimeThe absolute deadline. Should be a UTC datetime. |
| Returns | |
|---|---|
| Type | Description |
Expiration |
An Expiration with the specified absolute deadline. |
Deadlines in the past are valid, and will cause immediate failure of the operation being performed.
FromTimeout(TimeSpan)
public static Expiration FromTimeout(TimeSpan timeout)Create an Expiration with a relative timeout.
| Parameter | |
|---|---|
| Name | Description |
timeout |
TimeSpanThe relative timeout. |
| Returns | |
|---|---|
| Type | Description |
Expiration |
An Expiration with the specified relative timeout. |
Zero or negative timeouts are valid, and will cause immediate failure of the operation being performed.