示例#1
0
        public void Send(ReportBody body)
        {
            var hash = body.Hash();

            if (_cache.Contains(hash))
            {
                // return;
            }

            _cache.Add(hash);
            _origin.Send(body);
        }
示例#2
0
        public void Send(ReportBody body)
        {
            var content = GetJsonContent(body);

            _taskQueue.Enqueue(() =>
            {
                try
                {
                    _httpClient.PostAsync(_uri, content);
                }
                catch (HttpRequestException)
                {
                    // ignore
                }
            });
        }