NoaaWeatherStationResponse¶
Namespace: ThinkGeo.Core
Represents a deserialized NOAA station response containing basic station metadata.
public class NoaaWeatherStationResponse
Inheritance object → NoaaWeatherStationResponse
Properties¶
RequestIndex¶
Gets or sets the RequestIndex.
public double RequestIndex { get; set; }
Property Value¶
Stations¶
Gets or sets the Stations.
public List<NoaaWeatherStation> Stations { get; set; }
Property Value¶
Constructors¶
NoaaWeatherStationResponse()¶
public NoaaWeatherStationResponse()
Methods¶
DownloadNoaaWeatherStationResponse()¶
Downloads and deserializes the latest NOAA station metadata response.
public static NoaaWeatherStationResponse DownloadNoaaWeatherStationResponse()
Returns¶
NoaaWeatherStationResponse
The populated response object, or null when the request fails (network error, unsupported platform such as Blazor WASM with no synchronous I/O, or malformed payload).
Remarks:
Uses HttpClient internally (no HttpWebRequest) so the call works on platforms where the legacy WebRequest stack is unavailable. The method itself is still synchronous and blocks the calling thread; on Blazor WASM, where sync-over-async is not allowed, this method will throw or hang. Real WASM support requires to expose an async counterpart — out of scope here.
DownloadNoaaWeatherStationResponse(int)¶
Downloads and deserializes the latest NOAA station metadata response, giving up after seconds; 0 waits as long as the server takes.
public static NoaaWeatherStationResponse DownloadNoaaWeatherStationResponse(int timeoutInSeconds)
Parameters¶
timeoutInSeconds int
Returns¶
NoaaWeatherStationResponse
The populated response object, or null when the request fails or times out.