public void Send(ReportBody body) { var hash = body.Hash(); if (_cache.Contains(hash)) { // return; } _cache.Add(hash); _origin.Send(body); }
public void Send(ReportBody body) { var content = GetJsonContent(body); _taskQueue.Enqueue(() => { try { _httpClient.PostAsync(_uri, content); } catch (HttpRequestException) { // ignore } }); }