示例#1
0
        private void UploadRequestLogFiles(string requestLogId, CreateRequestLogRequest request, IList <LoggerFile> files)
        {
            if (files == null || !files.Any())
            {
                return;
            }

            if (string.IsNullOrEmpty(requestLogId))
            {
                return;
            }

            IList <File> requestFiles = files.Select(p => new File
            {
                FileName     = p.FileName,
                Extension    = p.Extension,
                FullFileName = p.FullFileName,
                FilePath     = p.FilePath
            }).ToList();

            UploadFilesRequest uploadRequest = new UploadFilesRequest
            {
                OrganizationId     = request.OrganizationId,
                ApplicationId      = request.ApplicationId,
                RequestLogId       = requestLogId,
                RequestLogClientId = request.ClientId,
                HttpStatusCode     = request.WebRequest?.Response?.HttpStatusCode ?? 500,
                Files = requestFiles
            };

            _kissLogApi.UploadRequestLogFiles(uploadRequest);
        }
示例#2
0
 public ApiResult <bool> UploadRequestLogFiles(UploadFilesRequest request)
 {
     return(_v1Api.UploadRequestLogFiles(request));
 }