Table of Contents

Struct TimestampedReadingValue

Namespace
Acuit.Pinpoint.IO.Testing
Assembly
Acuit.Pinpoint.IO.Testing.Abstractions.dll

A timestamped reading value.

public readonly struct TimestampedReadingValue : IReadingValue, ITimestampedDataValue, IDataValue, IFormattable, IEquatable<TimestampedReadingValue>, IConvertible
Implements
Inherited Members
Extension Methods

Constructors

TimestampedReadingValue(IReadingValue, DateTimeOffset)

Initializes a new instance of the TimestampedReadingValue struct.

public TimestampedReadingValue(IReadingValue inner, DateTimeOffset timestamp)

Parameters

inner IReadingValue

The inner IReadingValue.

timestamp DateTimeOffset

Properties

Descriptor

Gets the reading value descriptor.

public IReadingDescriptor Descriptor { get; }

Property Value

IReadingDescriptor

Inner

Gets the inner data value, or null if there is none.

public IDataValue Inner { get; }

Property Value

IDataValue

Remarks

This allows additional data to be added to data values, such as timestamps or validation results.

When this is set for a data value, Value and Descriptor must return the same values as those of Inner.

Timestamp

Gets the timestamp.

public DateTimeOffset Timestamp { get; }

Property Value

DateTimeOffset

Value

Gets the value, which is expected to be immutable.

public object Value { get; }

Property Value

object

Methods

Equals(TimestampedReadingValue)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(TimestampedReadingValue other)

Parameters

other TimestampedReadingValue

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object)

Indicates whether this instance and a specified object are equal.

public override bool Equals(object obj)

Parameters

obj object

The object to compare with the current instance.

Returns

bool

true if obj and this instance are the same type and represent the same value; otherwise, false.

GetHashCode()

Returns the hash code for this instance.

public override int GetHashCode()

Returns

int

A 32-bit signed integer that is the hash code for this instance.

ToString()

Returns the fully qualified type name of this instance.

public override string ToString()

Returns

string

The fully qualified type name.

ToString(string, IFormatProvider)

Formats the value of the current instance using the specified format.

public string ToString(string format, IFormatProvider formatProvider)

Parameters

format string

The format to use.-or- A null reference (Nothing in Visual Basic) to use the default format defined for the type of the IFormattable implementation.

formatProvider IFormatProvider

The provider to use to format the value.-or- A null reference (Nothing in Visual Basic) to obtain the numeric format information from the current locale setting of the operating system.

Returns

string

The value of the current instance in the specified format.

Operators

operator ==(TimestampedReadingValue, TimestampedReadingValue)

Returns a value that indicates whether two specified TimestampedReadingValue values are equal.

public static bool operator ==(TimestampedReadingValue left, TimestampedReadingValue right)

Parameters

left TimestampedReadingValue

The first value to compare.

right TimestampedReadingValue

The second value to compare.

Returns

bool

true if left and right are equal; otherwise, false.

operator !=(TimestampedReadingValue, TimestampedReadingValue)

Returns a value that indicates whether two specified TimestampedReadingValue values are not equal.

public static bool operator !=(TimestampedReadingValue left, TimestampedReadingValue right)

Parameters

left TimestampedReadingValue

The first value to compare.

right TimestampedReadingValue

The second value to compare.

Returns

bool

true if left and right are not equal; otherwise, false.