using System;
using System.Text.Json.Serialization;
namespace Darnton.Blazor.DeviceInterop.Geolocation
{
///
/// The result of a geolocation request. Contains either a or a .
///
public class GeolocationResult
{
///
/// The returned on successful geolocation.
///
public GeolocationPosition Position { get; set; }
///
/// The returned by a failed geolocation attempt.
///
public GeolocationPositionError Error { get; set; }
///
/// Indicates whether the geolocation attempt was successful.
///
[JsonIgnore]
public bool IsSuccess => !(Position is null);
}
}