Class Deadline
This class represents the latest date or time by which an operation should be completed.
Inherited Members
Namespace: Akka.Remote
Assembly: Akka.Remote.dll
Syntax
public class Deadline
Constructors
| Improve this Doc View SourceDeadline(DateTime)
Initializes a new instance of the Deadline class.
Declaration
public Deadline(DateTime when)
Parameters
Type | Name | Description |
---|---|---|
DateTime | when | The DateTime that the deadline is due. |
Properties
| Improve this Doc View SourceHasTimeLeft
Determines whether there is still time left until the deadline.
Declaration
public bool HasTimeLeft { get; }
Property Value
Type | Description |
---|---|
Boolean |
IsOverdue
Determines whether the deadline has past.
Declaration
public bool IsOverdue { get; }
Property Value
Type | Description |
---|---|
Boolean |
Now
A deadline that is due UtcNow
Declaration
public static Deadline Now { get; }
Property Value
Type | Description |
---|---|
Deadline |
TimeLeft
The amount of time left until the deadline is reached.
note
Warning: creates a new TimeSpan instance each time it's used
Declaration
public TimeSpan TimeLeft { get; }
Property Value
Type | Description |
---|---|
TimeSpan |
When
The DateTime that the deadline is due.
Declaration
public DateTime When { get; }
Property Value
Type | Description |
---|---|
DateTime |
Methods
| Improve this Doc View SourceEquals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj |
Returns
Type | Description |
---|---|
Boolean |
Overrides
| Improve this Doc View SourceGetHashCode()
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 |
Overrides
Operators
| Improve this Doc View SourceAddition(Deadline, Nullable<TimeSpan>)
Adds a given Nullable<T> to the due time of this Deadline
Declaration
public static Deadline operator +(Deadline deadline, TimeSpan? duration)
Parameters
Type | Name | Description |
---|---|---|
Deadline | deadline | The deadline whose time is being extended |
Nullable<TimeSpan> | duration | The amount of time being added to the deadline |
Returns
Type | Description |
---|---|
Deadline | A new deadline with the specified duration added to the due time |
Addition(Deadline, TimeSpan)
Declaration
public static Deadline operator +(Deadline deadline, TimeSpan duration)
Parameters
Type | Name | Description |
---|---|---|
Deadline | deadline | The deadline whose time is being extended |
TimeSpan | duration | The amount of time being added to the deadline |
Returns
Type | Description |
---|---|
Deadline | A new deadline with the specified duration added to the due time |