Process() public method

Gets a string containing the compiled CoffeeScript result.
public Process ( string input, AutoPrefixerOptions options ) : string
input string /// The input to process. ///
options AutoPrefixerOptions /// The AutoPrefixer options. ///
return string
コード例 #1
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;
        }
コード例 #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);
        }