public GeofenceProcessor(IRepository repository,
                          IGeofenceManager geofenceManager,
                          IGeofenceDelegate geofenceDelegate)
 {
     this.repository       = repository.Wrap();
     this.geofenceManager  = geofenceManager;
     this.geofenceDelegate = geofenceDelegate;
 }
Esempio n. 2
0
 public GeofenceManagerImpl(AndroidContext context,
                            IRepository repository,
                            IGeofenceDelegate geofenceDelegate) : base(repository)
 {
     this.context          = context;
     this.client           = LocationServices.GetGeofencingClient(this.context.AppContext);
     this.geofenceDelegate = geofenceDelegate;
 }
Esempio n. 3
0
        public override async void DidDetermineState(CLLocationManager manager, CLRegionState state, CLRegion region)
        {
            if (this.gdelegate == null)
            {
                this.gdelegate = ShinyHost.Resolve <IGeofenceDelegate>();
            }

            if (region is CLCircularRegion native)
            {
                var geofence = await this.repository.Get(native.Identifier);

                if (geofence != null)
                {
                    var args = new GeofenceCurrentStatus(geofence, state.FromNative());
                    this.stateSubject.OnNext(args);
                }
            }
        }
Esempio n. 4
0
 public GpsGeofenceDelegate(IGeofenceManager geofenceManager, IGeofenceDelegate geofenceDelegate)
 {
     this.CurrentStates    = new Dictionary <string, GeofenceState>();
     this.geofenceManager  = geofenceManager;
     this.geofenceDelegate = geofenceDelegate;
 }
 public GeofenceBackgroundTaskProcessor(IGeofenceDelegate gdelegate, IRepository repository)
 {
     this.gdelegate  = gdelegate;
     this.repository = repository;
 }
Esempio n. 6
0
 public GeofenceManagerDelegate()
 {
     this.gdelegate    = ShinyHost.Resolve <IGeofenceDelegate>();
     this.repository   = ShinyHost.Resolve <IRepository>().Wrap();
     this.stateSubject = new Subject <GeofenceCurrentStatus>();
 }
Esempio n. 7
0
 public GpsGeofenceDelegate(IGeofenceManager geofenceManager, IGeofenceDelegate geofenceDelegate)
 {
     this.geofenceManager  = geofenceManager;
     this.geofenceDelegate = geofenceDelegate;
 }