Table of Contents

Class Sensor

Namespace
Tudormobile.Airthings
Assembly
Tudormobile.Airthings.dll

Represents a single sensor reading from an Airthings device.

public record Sensor : IEquatable<Sensor>
Inheritance
Sensor
Implements
Inherited Members

Remarks

Mapping of the Airthings API response.

Constructors

Sensor()

public Sensor()

Sensor(Sensor)

protected Sensor(Sensor original)

Parameters

original Sensor

Properties

EqualityContract

protected virtual Type EqualityContract { get; }

Property Value

Type

SensorType

Gets or sets the type of sensor (e.g., radonShortTermAvg).

public string SensorType { get; set; }

Property Value

string

Unit

Gets or sets the unit of measurement for the reading (e.g., bq).

public string Unit { get; set; }

Property Value

string

Value

Gets or sets the sensor reading value.

public double Value { get; set; }

Property Value

double

Methods

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

Equals(Sensor?)

public virtual bool Equals(Sensor? other)

Parameters

other Sensor

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

PrintMembers(StringBuilder)

protected virtual bool PrintMembers(StringBuilder builder)

Parameters

builder StringBuilder

Returns

bool

ToString()

public override string ToString()

Returns

string

Operators

operator ==(Sensor?, Sensor?)

public static bool operator ==(Sensor? left, Sensor? right)

Parameters

left Sensor
right Sensor

Returns

bool

operator !=(Sensor?, Sensor?)

public static bool operator !=(Sensor? left, Sensor? right)

Parameters

left Sensor
right Sensor

Returns

bool