Beispiel #1
0
 public StaticCompressionContext(IDictionary <string, object> environment, StaticCompressionOptions options, IEncoding encoding, ICompressedStorage storage)
 {
     _environment         = environment;
     _options             = options;
     _encoding            = encoding;
     _encodingSuffix      = "^" + _encoding.Name;
     _encodingSuffixQuote = "^" + _encoding.Name + "\"";
     _storage             = storage;
     _request             = new OwinRequest(environment);
     _response            = new OwinResponse(environment);
 }
 public StaticCompressionContext(IDictionary<string, object> environment, StaticCompressionOptions options, IEncoding encoding, ICompressedStorage storage)
 {
     _environment = environment;
     _options = options;
     _encoding = encoding;
     _encodingSuffix = "^" + _encoding.Name;
     _encodingSuffixQuote = "^" + _encoding.Name + "\"";
     _storage = storage;
     _request = new OwinRequest(environment);
     _response = new OwinResponse(environment);
 }
Beispiel #3
0
 public StaticCompressionMiddleware(Func <IDictionary <string, object>, Task> next, StaticCompressionOptions options)
 {
     _next    = next;
     _options = options;
 }
 public static IAppBuilder UseStaticCompression(this IAppBuilder builder, StaticCompressionOptions options)
 {
     return builder.Use(typeof(StaticCompressionMiddleware), options);
 }
 public static IAppBuilder UseStaticCompression(this IAppBuilder builder, Action<StaticCompressionOptions> configure)
 {
     var options = new StaticCompressionOptions();
     configure(options);
     return UseStaticCompression(builder, options);
 }
 public StaticCompressionMiddleware(Func<IDictionary<string, object>, Task> next, StaticCompressionOptions options)
 {
     _next = next;
     _options = options;
 }