示例#1
0
 private void addToQueue(QsoDeleteData qdd)
 {
     logQueue.Enqueue(new LogRequest()
     {
         delete = qdd
     });
     saveUnsent();
 }
示例#2
0
        private async Task <bool> _postDeleteQso(QsoDeleteData qdd)
        {
            HttpResponseMessage response = await post("log", new QsoDeleteRequest(config, qdd));

            if (response == null || !response.IsSuccessStatusCode)
            {
                return(false);
            }
            return(true);
        }
示例#3
0
 public async Task deleteQso(QSO qso)
 {
     if (qso.serverTs != 0)
     {
         QsoDeleteData qdd = new QsoDeleteData {
             delete = qso.serverTs
         };
         if (logQueue.IsEmpty && config.token != null)
         {
             if (!await _postDeleteQso(qdd))
             {
                 addToQueue(qdd);
             }
         }
         else
         {
             addToQueue(qdd);
         }
     }
 }
示例#4
0
 internal QsoDeleteRequest(HttpServiceConfig _config, QsoDeleteData qdd) : base(_config)
 {
     delete = qdd.delete;
 }