The auto prefixer processor. Many thanks here to Taritsyn's
Наследование: IDisposable
        /// <summary>
        /// Transforms the content of the given string. 
        /// </summary>
        /// <param name="input">
        /// The input string to transform.
        /// </param>
        /// <param name="options">
        /// The <see cref="AutoPrefixerOptions"/>.
        /// </param>
        /// <returns>
        /// The transformed string.
        /// </returns>
        public string Transform(string input, AutoPrefixerOptions options)
        {
            if (!options.Enabled)
            {
                return input;
            }

            using (AutoPrefixerProcessor processor = new AutoPrefixerProcessor(CruncherConfiguration.Instance.JsEngineFunc))
            {
                input = processor.Process(input, options);
            }

            return input;
        }
Пример #2
0
        /// <summary>
        /// Transforms the content of the given string.
        /// </summary>
        /// <param name="input">
        /// The input string to transform.
        /// </param>
        /// <param name="options">
        /// The <see cref="AutoPrefixerOptions"/>.
        /// </param>
        /// <returns>
        /// The transformed string.
        /// </returns>
        public string Transform(string input, AutoPrefixerOptions options)
        {
            if (!options.Enabled)
            {
                return(input);
            }

            using (AutoPrefixerProcessor processor = new AutoPrefixerProcessor(CruncherConfiguration.Instance.JsEngineFunc))
            {
                input = processor.Process(input, options);
            }

            return(input);
        }