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"]); } }
/// <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; } } }
public ValueTask <bool> ClearWatchPosition(long watchId) => Geolocation.ClearWatchPosition(Interop, watchId);