private string GetCorrelationId(HttpContext context) { if (context.Request.Headers.ContainsKey(CorrelationIdHeaderName)) { return(context.Request.Headers[CorrelationIdHeaderName]); } return(_guidFactory.NewAsString()); }
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)); }