Minifier, which produces minifiction of JS-code by using Microsoft Ajax JS Minifier
Наследование: MsAjaxMinifierBase, IJsMinifier
        public IJsMinifier CreateMinifier(string minifierName)
        {
            #if DNXCORE50
            IJsMinifier minifier = new CrockfordJsMinifier();
            #else
            IJsMinifier minifier;

            switch (minifierName)
            {
                case "CrockfordJsMinifier":
                    minifier = new CrockfordJsMinifier();
                    break;
                case "MsAjaxJsMinifier":
                    minifier = new MsAjaxJsMinifier();
                    break;
                case "YuiJsMinifier":
                    minifier = new YuiJsMinifier();
                    break;
                default:
                    throw new NotSupportedException();
            }
            #endif

            return minifier;
        }
Пример #2
0
		public IJsMinifier CreateMinifier(string minifierName)
		{
			IJsMinifier minifier;

			switch (minifierName)
			{
				case "CrockfordJsMinifier":
					minifier = new CrockfordJsMinifier();
					break;
#if !NETSTANDARD1_6
				case "MsAjaxJsMinifier":
					minifier = new MsAjaxJsMinifier();
					break;
				case "YuiJsMinifier":
					minifier = new YuiJsMinifier();
					break;
#endif
				case "NUglifyJsMinifier":
					minifier = new NUglifyJsMinifier();
					break;
				default:
					throw new NotSupportedException();
			}

			return minifier;
		}