Skip to content

Izayoi.Data.TimestampedObjects.TimestampedString

IzayoiJiichan edited this page Feb 1, 2025 · 1 revision

TimestampedString

Definition

Namespace Izayoi.Data.TimestampedObjects
Assembly Izayoi.Data.TimestampedObjects.dll

Represents a comparable timestamped structure that can be assigned comparable class.

public readonly struct TimestampedString :
    ITimestamped,
    IComparableTimestampedBase<string>,
    IComparable,
    IComparable<TimestampedString>,
    IComparable<ComparableTimestampedClass<string>>,
    IEquatable<TimestampedString>,
    IEquatable<ComparableTimestampedClass<string>>

Inheritance

Object -> ValueType -> TimestampedString

Constructors

Name Summary
TimestampedString(in long timestamp, in string? value) Initializes an instance of the TimestampedString structure to the specified timestamp and value.
TimestampedString(in long timestamp, in char c, in int count) Initializes an instance of the TimestampedString structure to the specified timestamp, c and count.
TimestampedString(in long timestamp, in char[] value) Initializes an instance of the TimestampedString structure to the specified timestamp and value.
TimestampedString(in long timestamp, in char[] value, in int startIndex, in int length) Initializes an instance of the TimestampedString structure to the specified timestamp, value, startIndex and length.
TimestampedString(in long timestamp, in ReadOnlySpan value) Initializes an instance of the TimestampedString structure to the specified timestamp and value.
TimestampedString(in string? value) Initializes an instance of the TimestampedString structure to the specified value.
TimestampedString(in char c, in int count) Initializes an instance of the TimestampedString structure to the specified c and count.
TimestampedString(in char[] value) Initializes an instance of the TimestampedString structure to the specified value.
TimestampedString(in char[] value, in int startIndex, in int length) Initializes an instance of the TimestampedString structure to the specified value, startIndex and length.
TimestampedString(in ReadOnlySpan value) Initializes an instance of the TimestampedString structure to the specified timestamp and value.

Properties

Name Type Summary
Timestamp long Gets Unix timestamp milliseconds.
Value string? Gets the string value of the current object.

Methods

Name Returns Summary
CompareTo(TimestampedString other) int Compares this instance to a specified TimestampedString and returns an indication of their relative values.
CompareTo(ComparableTimestampedClass<string>? other) int Compares this instance to a specified ComparableTimestampedClass<string> and returns an indication of their relative values.
CompareTo(object? other) int Compares this instance to a specified object and returns an indication of their relative values.
Deconstruct(out long timestamp, out TValue value) void Deconstructs this TimestampedString instance by timestamp and value.
Equals(TimestampedString other) bool Indicates whether the current TimestampedString object is equal to a specified TimestampedString.
Equals(ComparableTimestampedClass<string>? other) bool Indicates whether the current TimestampedString object is equal to a specified ComparableTimestampedClass<string>.
Equals(object? other) bool Indicates whether the current TimestampedString object is equal to a specified object.
GetHashCode() string Returns the hash code for this instance.
ToString() string? Returns the text representation of the value of the current TimestampedString object.

Operators

Operator Returns Left Right
== bool TimestampedString TimestampedString
!= bool TimestampedString TimestampedString
< bool TimestampedString TimestampedString
<= bool TimestampedString TimestampedString
> bool TimestampedString TimestampedString
>= bool TimestampedString TimestampedString
Type From To
implicit TimestampedString ComparableTimestampedClass<string>
implicit ComparableTimestampedClass<string> TimestampedString

Remarks

The order of comparison is Timestamp first, Value second.

Examples

Example.TimestampedString

Applies to

Product Versions
.NET 8, 9
.NET Standard 2.0, 2.1
Clone this wiki locally