BackendlessAPI.Geo.Fence.GeoFenceMonitoring.OnLocationChanged C# (CSharp) Метод

OnLocationChanged() публичный Метод

public OnLocationChanged ( double latitude, double longitude, double accuracy ) : void
latitude double
longitude double
accuracy double
Результат void
    public void OnLocationChanged( double latitude, double longitude, double accuracy )
  {
    HashSet<GeoFence> oldFences, newFences, currFence;

    lock( this )
    {
      this.location = new GeoPoint( latitude, longitude ); ;
      oldFences = pointFences;
      currFence = FindGeoPointsFence( location );
      newFences = new HashSet<GeoFence>( currFence );

      newFences.ExceptWith( oldFences );
      oldFences.ExceptWith( currFence );

      CallOnEnter( newFences );
      CallOnStay( newFences );
      CallOnExit( oldFences );
      CancelOnStay( oldFences );

      pointFences = currFence;
    }
  }