public GeolocationException(GeolocationError error) : base("A geolocation error occured: " + error) { if (!Enum.IsDefined(typeof(GeolocationError), error)) { throw new ArgumentException("error is not a valid GelocationError member", "error"); } Error = error; }
public GeolocationException(GeolocationError error, Exception innerException) : base("A geolocation error occured: " + error, innerException) { if (!Enum.IsDefined (typeof (GeolocationError), error)) throw new ArgumentException ("error is not a valid GelocationError member", "error"); Error = error; }
private async ValueTask DispatchEventAsync(GeolocationJsEventArgs eventArgs) { await Task.Run(() => { switch (eventArgs.Type) { case "geolocationerror": GeolocationError?.Invoke(new GeolocationErrorEventArgs(eventArgs)); break; case "geolocationsuccess": GeolocationSuccess?.Invoke(new GeolocationSuccessEventArgs(eventArgs)); break; } }); }
/// <summary> /// Initializes a new instance of the <see cref="PositionErrorEventArgs"/> class. /// </summary> /// <param name="error">The error.</param> public PositionErrorEventArgs(GeolocationError error) { Error = error; }
public PositionErrorEventArgs(GeolocationError error) { Error = error; }
public GeolocationException(GeolocationError error) { Info = error; }
/// <summary> /// Watches for changes to the device's current position. /// </summary> /// <param name="geolocationSuccess">The callback that is called with the current position.</param> /// <param name="geolocationError">The callback that is called if there was an error.</param> /// <returns>returns a watch id that references the watch position interval. The watch id should be used with geolocation.clearWatch to stop watching for changes in position.</returns> public JsString watchPosition(GeolocationSuccess geolocationSuccess, GeolocationError geolocationError) { return null; }
/// <summary> /// geolocation.getCurrentPositon is an asynchronous function. It returns the device's current position to the /// geolocationSuccess callback with a Position object as the parameter. /// If there is an error, the geolocationError callback is invoked with a PositionError object. /// </summary> /// <param name="geolocationSuccess">The callback that is called with the current position.</param> /// <param name="geolocationError">The callback that is called if there was an error.</param> /// <returns>Contains Position coordinates and timestamp, created by the geolocation API.</returns> public Position getCurrentPosition(GeolocationSuccess geolocationSuccess, GeolocationError geolocationError) { return null; }
public PositionErrorEventArgs(GeolocationError param_error) { }
public GeolocationException(GeolocationError param_error, Exception param_innerException) { }
public GeolocationException(GeolocationError param_error) { }