Пример #1
0
 public TrackLocationRepository(IMasterRepository masterRepository, ITrackLocationService <T> service)
     : base(masterRepository)
 {
     _Service = service;
     _MasterRepo.OnPlatformServiceCallBack.Add(async(serviceKey, model) =>
     {
         if (serviceKey.Equals("LocationService"))
         {
             var locationModel = new TrackLocationViewModel
             {
                 Lat = ((ILocation)model).Lat,
                 Lon = ((ILocation)model).Lon
             };
             await _Service.TrackLocation(locationModel);
         }
     });
 }
Пример #2
0
        public async Task TrackLocation(TrackLocationViewModel model, Action <T> completeAction)
        {
            var serviceReturnModel = await _Service.TrackLocation(model);

            completeAction(serviceReturnModel);
        }