public async Task SaveExceptionAsync(DomainUpkManagerException Exception)
        {
            UpkManagerException exception = await Task.Run(() => mapper.Map <UpkManagerException>(Exception));

            RestRequest request = new RestRequest("UpkException", Method.POST)
            {
                RequestFormat = DataFormat.Json
            };

            request.AddBody(exception);

            await client.ExecuteTaskAsync <string>(request);
        }
Exemple #2
0
        private void storeException(Exception ex)
        {
            while (ex.InnerException != null)
            {
                ex = ex.InnerException;
            }

            DomainUpkManagerException exception = new DomainUpkManagerException {
                Exception   = ex,
                MachineName = Environment.MachineName,
                HappenedAt  = DateTime.Now
            };

            Task.Run(() => exceptionRepository.SaveExceptionAsync(exception)).Wait();
        }