Esempio n. 1
0
    private async Task ClearWatchPosition()
    {
        if (WatchID != 0)
        {
            Interop ??= new JSInterop <Geolocations>(JSRuntime);
            var ret = await Geolocation.ClearWatchPosition(Interop, WatchID);

            if (ret)
            {
                WatchID = 0;
            }
            Trace.Log(ret ? Localizer["ClearWatchPositionResultSuccess"] : Localizer["ClearWatchPositionResultFailed"]);
        }
    }
Esempio n. 2
0
    /// <summary>
    ///
    /// </summary>
    /// <param name="disposing"></param>
    protected virtual async ValueTask DisposeAsync(bool disposing)
    {
        if (disposing)
        {
            if (Interop != null)
            {
                if (WatchID != 0)
                {
                    await Geolocation.ClearWatchPosition(Interop, WatchID);
                }

                Interop.Dispose();
                Interop = null;
            }
        }
    }
Esempio n. 3
0
 public ValueTask <bool> ClearWatchPosition(long watchId) => Geolocation.ClearWatchPosition(Interop, watchId);