public List <JsModuleViewModel> Evaluate(IEnumerable <string> jsLines)
        {
            var output = new List <JsModuleViewModel>();

            foreach (var jsLine in jsLines)
            {
                if (jsLine.Contains("@@") || !jsLine.Contains("@"))
                {
                    continue;
                }

                var razorFragments = JsModuleLineEvaluator.Evaluate(jsLine);

                foreach (var fragment in razorFragments)
                {
                    var razorVariable = JsVariableNameEvaluator.Evaluate(fragment.Text);
                    output.Add(new JsModuleViewModel
                    {
                        JavaScriptName    = razorVariable,
                        OriginalRazorText = fragment.Text,
                        FragType          = fragment.FragType
                    });
                }
            }

            return(output);
        }
        /// <summary>
        /// From a block of JS, extract razor fragments and generate a variable name for each.
        /// </summary>
        public List <JsModuleViewModel> Evaluate(IEnumerable <string> jsLines)
        {
            // input:
            // multiple lines of JS, some of which use @razor variable/functions

            // output:
            // a collection of those razor fragments, each with a corresponding variable name (generated from the razor fragment)


            List <JsModuleViewModel> output = new List <JsModuleViewModel>();

            foreach (string jsLine in jsLines)
            {
                if (jsLine.Contains("@@") || !jsLine.Contains("@"))
                {
                    continue;
                }

                IEnumerable <Fragment> razorFragments = JsModuleLineEvaluator.Evaluate(jsLine);

                foreach (Fragment fragment in razorFragments)
                {
                    string razorVariable = JsVariableNameEvaluator.Evaluate(fragment.Text);
                    output.Add(new JsModuleViewModel()
                    {
                        JavaScriptName = razorVariable, OriginalRazorText = fragment.Text
                    });
                }
            }

            return(output);
        }