示例#1
0
        public void Compress()
        {
            switch (InputFile.Substring(InputFile.LastIndexOf(".")).ToLower())
            {
                case ".aspx":
                case ".ascx":
                case ".master":
                case ".htm":
                case ".html":

                    AspxStringCompressor sc = new AspxStringCompressor();
                    this.OutputText = sc.Compress(this.InputText);
                    IsCompressed = true;
                    break;

                case ".js":
                    JavaScriptMinifier jsmin = new JavaScriptMinifier();
                    this.OutputText = jsmin.Minify(this.InputText);
                    IsCompressed = true;
                    break;

                case ".css":
                    this.OutputText = CssCompressor.Compress(this.InputText);
                    IsCompressed = true;
                    break;

                default:
                    IsCompressed = false;
                    break;
            }
        }
 public void Compress()
 {
     AspxStringCompressor sc = new AspxStringCompressor();
     this.OutputText = sc.Compress(this.InputText);
 }