Example #1
0
        /// <summary>
        /// Consumes the parameter values.
        /// </summary>
        /// <param name="parametersData">The parameters data.</param>
        public void ConsumeParameterValues(IDictionary parametersData)
        {
            Debug.WriteLine("SPSRollUp ConsumeParameterValues " + Title);

            if (parametersData != null)
            {
                foreach (string key in parametersData.Keys)
                {
                    if (!string.IsNullOrEmpty(parametersData[key].ToString()))
                    {
                        _camlPreprocessor.AddVariable(
                            key,
                            parametersData[key].ToString());
                    }
                    Debug.WriteLine("*Parameter: " + key + " - " + parametersData[key]);
                }
            }

            if (Page != null)
            {
                // Process the new query
                _rollupEngine.CamlQuery   = _camlPreprocessor.Evaluate();
                _rollupEngine.SelectedRow = 0;

                InternalCrawl(false);
            }
        }
Example #2
0
        /// <summary>
        /// Debugs the render.
        /// </summary>
        /// <param name="writer">The writer.</param>
        protected void DebugRender(HtmlTextWriter writer)
        {
            SPSEditorPartsTools editorTools = new SPSEditorPartsTools(writer);

            if (DebugQuery)
            {
                if (!string.IsNullOrEmpty(CamlQuery))
                {
                    WriteDebug(writer, "DEBUG CAML Query (No Query)", string.Empty);
                }
                else
                {
                    string resultQuery = editorTools.FormatXml(CamlQuery);
                    WriteDebug(writer, "DEBUG CAML Query (Original)", resultQuery);
                    resultQuery = editorTools.FormatXml(_camlPreprocessor.Evaluate());
                    WriteDebug(writer, "DEBUG CAML Query (Processed)", resultQuery);
                }
            }

            if (DebugResults)
            {
                WriteDebug(writer, "DEBUG XML DATA", editorTools.FormatXml(_collector.GetXml()));
            }

            if (DebugEvaluator)
            {
                writer.Write("<font color=red>DEBUG Evaluator</font><br>");
                writer.Write(EvaluatorSample());
                writer.Write("<br>");
            }
        }