Example #1
0
 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;
        }
Example #3
0
        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;
                }
            });
        }
Example #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PositionErrorEventArgs"/> class.
 /// </summary>
 /// <param name="error">The error.</param>
 public PositionErrorEventArgs(GeolocationError error)
 {
     Error = error;
 }
Example #5
0
 public PositionErrorEventArgs(GeolocationError error)
 {
   Error = error;
 }
Example #6
0
 public GeolocationException(GeolocationError error)
 {
     Info = error;
 }
Example #7
0
 public GeolocationException(GeolocationError error)
 {
     Info = error;
 }
Example #8
0
 /// <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; }
Example #9
0
 /// <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; }
Example #10
0
 public PositionErrorEventArgs(GeolocationError param_error)
 {
 }
Example #11
0
 public GeolocationException(GeolocationError param_error, Exception param_innerException)
 {
 }
Example #12
0
 public GeolocationException(GeolocationError param_error)
 {
 }