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

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

            _cache.Add(hash);
            _origin.Send(body);
        }
コード例 #2
0
ファイル: ReportClient.cs プロジェクト: zhenguang/win-app
        public void Send(ReportBody body)
        {
            var content = GetJsonContent(body);

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