Struct Timestamp<T>
- Namespace
- RxSharp
- Assembly
- RxSharp.dll
A value tagged with the wall-clock time it was received. Produced by Timestamp<T>(Observable<T>, IScheduler?).
public readonly struct Timestamp<T> : IEquatable<Timestamp<T>>
Type Parameters
TThe type of the tagged value.
- Implements
-
IEquatable<Timestamp<T>>
Remarks
Uses Now rather than reading the system clock directly, matching every other
time-based operator in this port, so a future virtual-time scheduler can control it in tests.
The timestamp property is named TimestampValue, not Timestamp (rxjs's own field name),
because C# (CS0542) forbids a member from sharing its enclosing type's name.
Constructors
Timestamp(T, DateTimeOffset)
Initializes a new instance of the Timestamp<T> struct.
public Timestamp(T value, DateTimeOffset timestamp)
Parameters
valueTThe emitted value.
timestampDateTimeOffsetThe time the value was received.
Properties
TimestampValue
Gets the time Value was received.
public DateTimeOffset TimestampValue { get; }
Property Value
- DateTimeOffset
Value
Gets the emitted value.
public T Value { get; }
Property Value
- T
Methods
Equals(Timestamp<T>)
public bool Equals(Timestamp<T> other)
Parameters
otherTimestamp<T>
Returns
- bool
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject?
Returns
- bool
GetHashCode()
public override int GetHashCode()
Returns
- int
ToString()
public override string ToString()
Returns
- string