Reorganise project structure and namespaces. Remove Leaflet project and replace with Darnton.Blazor.Leaflet package.

This commit is contained in:
Bernard Darnton
2020-10-28 10:25:04 +13:00
parent 9576c5aa5b
commit 7dc4cea8ae
46 changed files with 431 additions and 441 deletions
@@ -0,0 +1,26 @@
using System;
using System.Text.Json.Serialization;
namespace Darnton.Blazor.DeviceInterop.Geolocation
{
/// <summary>
/// The result of a geolocation request. Contains either a <see cref="GeolocationPosition"/> or a <see cref="GeolocationPositionError"/>.
/// </summary>
public class GeolocationResult
{
/// <summary>
/// The <see cref="GeolocationPosition"/> returned on successful geolocation.
/// </summary>
public GeolocationPosition Position { get; set; }
/// <summary>
/// The <see cref="GeolocationPositionError"/> returned by a failed geolocation attempt.
/// </summary>
public GeolocationPositionError Error { get; set; }
/// <summary>
/// Indicates whether the geolocation attempt was successful.
/// </summary>
[JsonIgnore]
public bool IsSuccess => !(Position is null);
}
}