Targeting System 2.0.0
Plugin for multipurpose targeting and visual effects.
UniRx.Timestamped< T > Class Template Reference

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. More...

Inheritance diagram for UniRx.Timestamped< T >:

Public Member Functions

 Timestamped (T value, DateTimeOffset timestamp)
 Constructs a timestamped value. More...
 
bool Equals (Timestamped< T > other)
 Determines whether the current Timestamped<T> value has the same Value and Timestamp as a specified Timestamped<T> value. More...
 
override bool Equals (object obj)
 Determines whether the specified System.Object is equal to the current Timestamped<T>. More...
 
override int GetHashCode ()
 Returns the hash code for the current Timestamped<T> value. More...
 
override string ToString ()
 Returns a string representation of the current Timestamped<T> value. More...
 

Static Public Member Functions

static bool operator== (Timestamped< T > first, Timestamped< T > second)
 Determines whether the two specified Timestamped<T> values have the same Value and Timestamp. More...
 
static bool operator!= (Timestamped< T > first, Timestamped< T > second)
 Determines whether the two specified Timestamped<T> values don't have the same Value and Timestamp. More...
 
static Timestamped< T > Create< T > (T value, DateTimeOffset timestamp)
 Creates an instance of a Timestamped<T>. This is syntactic sugar that uses type inference to avoid specifying a type in a constructor call, which is very useful when using anonymous types. More...
 

Properties

Value [get]
 Gets the value.
 
DateTimeOffset Timestamp [get]
 Gets the timestamp.
 

Detailed Description

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.

A helper class with a factory method for creating Timestamped<T> instances.

Template Parameters
TThe type of the value being timestamped.

Constructor & Destructor Documentation

◆ Timestamped()

UniRx.Timestamped< T >.Timestamped ( value,
DateTimeOffset  timestamp 
)

Constructs a timestamped value.

Parameters
valueThe value to be annotated with a timestamp.
timestampTimestamp associated with the value.

Member Function Documentation

◆ Create< T >()

static Timestamped< T > UniRx.Timestamped< T >.Create< T > ( value,
DateTimeOffset  timestamp 
)
static

Creates an instance of a Timestamped<T>. This is syntactic sugar that uses type inference to avoid specifying a type in a constructor call, which is very useful when using anonymous types.

Parameters
valueThe value to be annotated with a timestamp.
timestampTimestamp associated with the value.
Returns
Creates a new timestamped value.

◆ Equals() [1/2]

override bool UniRx.Timestamped< T >.Equals ( object  obj)

Determines whether the specified System.Object is equal to the current Timestamped<T>.

Parameters
objThe System.Object to compare with the current Timestamped<T>.
Returns
true if the specified System.Object is equal to the current Timestamped<T>; otherwise, false.

◆ Equals() [2/2]

bool UniRx.Timestamped< T >.Equals ( Timestamped< T >  other)

Determines whether the current Timestamped<T> value has the same Value and Timestamp as a specified Timestamped<T> value.

Parameters
otherAn object to compare to the current Timestamped<T> value.
Returns
true if both Timestamped<T> values have the same Value and Timestamp; otherwise, false.

◆ GetHashCode()

override int UniRx.Timestamped< T >.GetHashCode ( )

Returns the hash code for the current Timestamped<T> value.

Returns
A hash code for the current Timestamped<T> value.

◆ operator!=()

static bool UniRx.Timestamped< T >.operator!= ( Timestamped< T >  first,
Timestamped< T >  second 
)
static

Determines whether the two specified Timestamped<T> values don't have the same Value and Timestamp.

Parameters
firstThe first Timestamped<T> value to compare.
secondThe second Timestamped<T> value to compare.
Returns
true if the first Timestamped<T> value has a different Value or Timestamp as the second Timestamped<T> value; otherwise, false.

◆ operator==()

static bool UniRx.Timestamped< T >.operator== ( Timestamped< T >  first,
Timestamped< T >  second 
)
static

Determines whether the two specified Timestamped<T> values have the same Value and Timestamp.

Parameters
firstThe first Timestamped<T> value to compare.
secondThe second Timestamped<T> value to compare.
Returns
true if the first Timestamped<T> value has the same Value and Timestamp as the second Timestamped<T> value; otherwise, false.

◆ ToString()

override string UniRx.Timestamped< T >.ToString ( )

Returns a string representation of the current Timestamped<T> value.

Returns
String representation of the current Timestamped<T> value.

The documentation for this class was generated from the following file: