Table of Contents

Class AirthingsResponse<T>

Namespace
Tudormobile.Airthings.Service
Assembly
Airthings.Service.dll

Represents a standardized response from the Airthings Service API.

public sealed record AirthingsResponse<T> : IEquatable<AirthingsResponse<T>>

Type Parameters

T

The type of data contained in the response.

Inheritance
AirthingsResponse<T>
Implements
Inherited Members

Constructors

AirthingsResponse()

public AirthingsResponse()

Properties

Data

Gets the data returned by the API call, can be null.

public T? Data { get; init; }

Property Value

T

Remarks

May contain error information on failure. Can be null on success when no data is returned.

IsSuccess

Gets a value indicating whether the API call was successful.

public bool IsSuccess { get; init; }

Property Value

bool

Methods

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

Equals(AirthingsResponse<T>?)

public bool Equals(AirthingsResponse<T>? other)

Parameters

other AirthingsResponse<T>

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

ToString()

public override string ToString()

Returns

string

Operators

operator ==(AirthingsResponse<T>?, AirthingsResponse<T>?)

public static bool operator ==(AirthingsResponse<T>? left, AirthingsResponse<T>? right)

Parameters

left AirthingsResponse<T>
right AirthingsResponse<T>

Returns

bool

operator !=(AirthingsResponse<T>?, AirthingsResponse<T>?)

public static bool operator !=(AirthingsResponse<T>? left, AirthingsResponse<T>? right)

Parameters

left AirthingsResponse<T>
right AirthingsResponse<T>

Returns

bool