Ejemplo n.º 1
0
 public async Task WriteDevice(LoTDevice device) {
     if (device is Engduino) {
         try {
             await MobileService.GetTable<Engduino>().InsertAsync((Engduino)device);
         } catch (HttpRequestException e) {
             //cache it for later retry
             throw;
         }
     } else if (device is AndroidPhone) {
         try {
             await MobileService.GetTable<AndroidPhone>().InsertAsync((AndroidPhone)device);
         } catch (HttpRequestException e) {
             //cache it for later retry
             throw;
         }
     }
 }
Ejemplo n.º 2
0
 public async Task WriteDevice(LoTDevice device)
 {
     if (device is Engduino)
     {
         try {
             await MobileService.GetTable <Engduino>().InsertAsync((Engduino)device);
         } catch (HttpRequestException e) {
             //cache it for later retry
             throw;
         }
     }
     else if (device is AndroidPhone)
     {
         try {
             await MobileService.GetTable <AndroidPhone>().InsertAsync((AndroidPhone)device);
         } catch (HttpRequestException e) {
             //cache it for later retry
             throw;
         }
     }
 }