Struct Timestamped<T>
Represents value with a timestamp on it. The timestamp typically represents the time the value was received, using an IScheduler's clock to obtain the current time.
Implements
Inherited Members
Namespace: System.Reactive
Assembly: System.Reactive.Linq.dll
Syntax
[Serializable]
public struct Timestamped<T> : IEquatable<Timestamped<T>>
Type Parameters
Name | Description |
---|---|
T | The type of the value being timestamped. |
Constructors
| Improve this Doc View SourceTimestamped(T, DateTimeOffset)
Constructs a timestamped value.
Declaration
public Timestamped(T value, DateTimeOffset timestamp)
Parameters
Type | Name | Description |
---|---|---|
T | value | The value to be annotated with a timestamp. |
DateTimeOffset | timestamp | Timestamp associated with the value. |
Properties
| Improve this Doc View SourceTimestamp
Gets the timestamp.
Declaration
public DateTimeOffset Timestamp { get; }
Property Value
Type | Description |
---|---|
DateTimeOffset |
Value
Gets the value.
Declaration
public T Value { get; }
Property Value
Type | Description |
---|---|
T |
Methods
| Improve this Doc View SourceEquals(Object)
Determines whether the specified System.Object is equal to the current Timestamped<T>.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj | The System.Object to compare with the current Timestamped<T>. |
Returns
Type | Description |
---|---|
Boolean | true if the specified System.Object is equal to the current Timestamped<T>; otherwise, false. |
Overrides
| Improve this Doc View SourceEquals(Timestamped<T>)
Determines whether the current Timestamped<T> value has the same Value and Timestamp as a specified Timestamped<T> value.
Declaration
public bool Equals(Timestamped<T> other)
Parameters
Type | Name | Description |
---|---|---|
Timestamped<T> | other | An object to compare to the current Timestamped<T> value. |
Returns
Type | Description |
---|---|
Boolean | true if both Timestamped<T> values have the same Value and Timestamp; otherwise, false. |
GetHashCode()
Returns the hash code for the current Timestamped<T> value.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 | A hash code for the current Timestamped<T> value. |
Overrides
| Improve this Doc View SourceToString()
Returns a string representation of the current Timestamped<T> value.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String | String representation of the current Timestamped<T> value. |
Overrides
Operators
| Improve this Doc View SourceEquality(Timestamped<T>, Timestamped<T>)
Determines whether the two specified Timestamped<T> values have the same Value and Timestamp.
Declaration
public static bool operator ==(Timestamped<T> first, Timestamped<T> second)
Parameters
Type | Name | Description |
---|---|---|
Timestamped<T> | first | The first Timestamped<T> value to compare. |
Timestamped<T> | second | The second Timestamped<T> value to compare. |
Returns
Type | Description |
---|---|
Boolean | true if the first Timestamped<T> value has the same Value and Timestamp as the second Timestamped<T> value; otherwise, false. |
Inequality(Timestamped<T>, Timestamped<T>)
Determines whether the two specified Timestamped<T> values don't have the same Value and Timestamp.
Declaration
public static bool operator !=(Timestamped<T> first, Timestamped<T> second)
Parameters
Type | Name | Description |
---|---|---|
Timestamped<T> | first | The first Timestamped<T> value to compare. |
Timestamped<T> | second | The second Timestamped<T> value to compare. |
Returns
Type | Description |
---|---|
Boolean | true if the first Timestamped<T> value has a different Value or Timestamp as the second Timestamped<T> value; otherwise, false. |