コード例 #1
0
 private string GetCorrelationId(HttpContext context)
 {
     if (context.Request.Headers.ContainsKey(CorrelationIdHeaderName))
     {
         return(context.Request.Headers[CorrelationIdHeaderName]);
     }
     return(_guidFactory.NewAsString());
 }
コード例 #2
0
        public ITempFile Create(string tempFolder)
        {
            if (string.IsNullOrWhiteSpace(tempFolder))
            {
                throw new ArgumentException("Value cannot be null or whitespace.", nameof(tempFolder));
            }

            return(new TempFile(
                       _pathService.Combine(tempFolder, _guidFactory.NewAsString()),
                       _fileService));
        }