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
TThe 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
Methods
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
Equals(AirthingsResponse<T>?)
public bool Equals(AirthingsResponse<T>? other)
Parameters
otherAirthingsResponse<T>
Returns
GetHashCode()
public override int GetHashCode()
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(AirthingsResponse<T>?, AirthingsResponse<T>?)
public static bool operator ==(AirthingsResponse<T>? left, AirthingsResponse<T>? right)
Parameters
leftAirthingsResponse<T>rightAirthingsResponse<T>
Returns
operator !=(AirthingsResponse<T>?, AirthingsResponse<T>?)
public static bool operator !=(AirthingsResponse<T>? left, AirthingsResponse<T>? right)
Parameters
leftAirthingsResponse<T>rightAirthingsResponse<T>