Example #1
0
        public IResponseBuilder Content(IResponseContent content)
        {
            _Content       = content;
            _ContentLength = content.Length;

            return(this);
        }
 public CompressedResponseContent(IResponseContent originalContent, Func <Stream, Stream> generator)
 {
     OriginalContent = originalContent;
     Generator       = generator;
 }
Example #3
0
 public IResponseContent Compress(IResponseContent content)
 {
     return(new CompressedResponseContent(content, (target) => new BrotliStream(target, CompressionLevel.Fastest, false)));
 }
Example #4
0
 public IResponseContent Compress(IResponseContent content)
 {
     return(content);
 }
Example #5
0
        public void AddContent(string key, IResponseContent item)
        {
            this.content = this.content ?? new Dictionary <string, IResponseContent>();

            this.content.Add(key, item);
        }