Example #1
0
 private void SyncAddictionalData(Action <bool> callback)
 {
     try
     {
         _serviceClient.BeginSyncAddictionalData(new Encrypted <AddictionalData>(Bus.Prepare(null), _credentials.Value.SecretKey),
                                                 (o) => {
             var result = Handle(() => _serviceClient.EndSyncAddictionalData(o));
             if (result.Success && result.Value != null && result.Value.Data.Any())
             {
                 Bus.Handle(result.Value, null);
             }
             callback(result.Success);
         },
                                                 null);
     }
     catch
     {
         callback(false);
     }
 }