-
Notifications
You must be signed in to change notification settings - Fork 0
Izayoi.Data.TimestampedObjects.ComparableTimestampedStruct
IzayoiJiichan edited this page Feb 1, 2025
·
1 revision
Namespace | Izayoi.Data.TimestampedObjects |
Assembly | Izayoi.Data.TimestampedObjects.dll |
Represents a comparable timestamped structure that can be assigned comparable structure.
public readonly struct ComparableTimestampedStruct<TValue> :
IComparableTimestampedStruct<TValue>,
IComparable<ComparableTimestampedStruct<TValue>>,
IEquatable<ComparableTimestampedStruct<TValue>>
where TValue : struct, IComparable<TValue>, IEquatable<TValue>
TValue
The underlying value type of the ComparableTimestampedStruct<TValue> generic type.
IComparable<TVable>
IEquatable<TVable>
Object -> ValueType -> ComparableTimestampedStruct<TValue>
Name | Summary |
---|---|
ComparableTimestampedStruct<TValue>(in long timestamp, in TValue value) | Initializes an instance of the ComparableTimestampedStruct<TValue> structure to the specified timestamp and value. |
ComparableTimestampedStruct<TValue>(in TValue value) | Initializes an instance of the ComparableTimestampedStruct<TValue> structure to the specified value. |
Name | Type | Summary |
---|---|---|
Timestamp | long | Gets Unix timestamp milliseconds. |
Value | TValue | Gets the value of the current object if it has been assigned a valid underlying value. |
Name | Returns | Summary |
---|---|---|
CompareTo(ComparableTimestampedStruct<TValue> other) | int | Compares this instance to a specified ComparableTimestampedStruct<TValue> and returns an indication of their relative values. |
CompareTo(IComparableTimestampedStruct<TValue>? other) | int | Compares this instance to a specified IComparableTimestampedStruct<TValue> 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 ComparableTimestampedStruct<TValue> instance by timestamp and value. |
Equals(ComparableTimestampedStruct<TValue> other) | bool | Indicates whether the current ComparableTimestampedStruct<TValue> object is equal to a specified ComparableTimestampedStruct<TValue>. |
Equals(IComparableTimestampedStruct<TValue>? other) | bool | Indicates whether the current ComparableTimestampedStruct<TValue> object is equal to a specified IComparableTimestampedStruct<TValue>. |
Equals(object? other) | bool | Indicates whether the current ComparableTimestampedStruct<TValue> 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 ComparableTimestampedStruct<TValue> object. |
Operator | Returns | Left | Right |
---|---|---|---|
== | bool | ComparableTimestampedStruct<TValue> | ComparableTimestampedStruct<TValue> |
!= | bool | ComparableTimestampedStruct<TValue> | ComparableTimestampedStruct<TValue> |
< | bool | ComparableTimestampedStruct<TValue> | ComparableTimestampedStruct<TValue> |
<= | bool | ComparableTimestampedStruct<TValue> | ComparableTimestampedStruct<TValue> |
> | bool | ComparableTimestampedStruct<TValue> | ComparableTimestampedStruct<TValue> |
>= | bool | ComparableTimestampedStruct<TValue> | ComparableTimestampedStruct<TValue> |
Example.ComparableTimestampedStruct
The order of comparison is Timestamp
first, Value
second.
Product | Versions |
---|---|
.NET | 8, 9 |
.NET Standard | 2.0, 2.1 |
- Izayoi.Data
- Izayoi.Data.Query
- Izayoi.Data.Repository
- Izayoi.Data.Comparable
- Izayoi.Data.Packs
- Izayoi.Data.TimestampedObjects
- Izayoi.Data.Validation
Examples
- Database
- Map Class
- DbCommandAdapter
- DbDataMapper
- QueryOption
- QueryBuilder
- DbRepository
- Comparable
- Packs
- Timestamped Objects
- DataValidator
FAQ