Exemplo n.º 1
0
        public static void Start()
        {
            var defaultConfig = new SimpleCompressionConfiguration()
            {
                Compress = true,
                Compressor = new YUICompression(),
                ClientVersionPrefix = "ver1",
                Disable = false,
                FolderForCachedResources = "SuperCache",
            };
            SimpleCompressionConfiguration.SetDefaultConfiguration(defaultConfig);

            var routes = RouteTable.Routes;
            AddRoutes(routes, defaultConfig);
        }
Exemplo n.º 2
0
 private static void AddRoutes(RouteCollection routes, SimpleCompressionConfiguration configuration)
 {
     routes.Add(new Route(configuration.FolderForCachedResources + "{file}", new SimpleCompressionRouteHandler()));
 }
 public static void SetDefaultConfiguration(SimpleCompressionConfiguration defaultConfig)
 {
     _defaultConfiguration = defaultConfig;
 }