Пример #1
0
        public void Error(Exception ex)
        {
            OnError?.Invoke(this, ex);

            string url = ErrorUrl ?? GlobalErrorUrl;

            if (!url.IsNullOrWhiteSpace())
            {
                HttpQuery.CallService(url, new Dictionary <string, object>()
                {
                    { "exception", ex.Message }, { "trace", ex.StackTrace }, { "name", RuleName }, { "date_last_start", LastStart }, { "date_err", DateTime.Now }
                }, timeoutSeconds: 10).GetAwaiter().GetResult();
            }
        }
Пример #2
0
        public void Complete()
        {
            OnComplete?.Invoke(this);

            if (DoNotSendComplete)
            {
                string url = CompleteUrl ?? GlobalCompleteUrl;

                if (!url.IsNullOrWhiteSpace())
                {
                    HttpQuery.CallService(url, new Dictionary <string, object>()
                    {
                        { "name", RuleName }, { "date_last_start", LastStart }, { "date_complete", DateTime.Now }
                    }, timeoutSeconds: 10).GetAwaiter().GetResult();
                }
            }
        }