private void addToQueue(QsoDeleteData qdd) { logQueue.Enqueue(new LogRequest() { delete = qdd }); saveUnsent(); }
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); }
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); } } }
internal QsoDeleteRequest(HttpServiceConfig _config, QsoDeleteData qdd) : base(_config) { delete = qdd.delete; }