protected override XPathNavigator GetXPathNavigator(string viewPath)
        {
            base.EnsureWebpartReady();

            HighConfidenceResultsDataSource dataSource = this.DataSource as HighConfidenceResultsDataSource;
            var resultsDataSourceView = dataSource.GetView() as HighConfidenceResultsDataSourceView;

            resultsDataSourceView.ExactTermMatching = ExactTermMatching;
            return(resultsDataSourceView.GetXPathNavigator(null));
        }
        protected override void ModifyXsltArgumentList(ArgumentClassWrapper argList)
        {
            argList.SetParameter("BBLimit", string.Empty, this._bbLimit);
            argList.SetParameter("DisplayDefinition", string.Empty, this._displayDefinition);
            argList.SetParameter("DisplayDescription", string.Empty, this._displayDescription);
            argList.SetParameter("DisplayHCDescription", string.Empty, this._displayHCDescription);
            argList.SetParameter("DisplayHCImage", string.Empty, this._displayHCImage);
            argList.SetParameter("DisplayHCProps", string.Empty, this._displayHCProps);
            argList.SetParameter("DisplayHCTitle", string.Empty, this._displayHCTitle);
            argList.SetParameter("DisplayTerm", string.Empty, this._displayTerm);
            argList.SetParameter("DisplayTitle", string.Empty, this._displayBestBetTitle);
            argList.SetParameter("DisplayUrl", string.Empty, this._displayUrl);
            argList.SetParameter("ResultsPerTypeLimit", string.Empty, this._resultsPerTypeLimit);
            argList.SetParameter("DisplayST", string.Empty, this._displayTerm | this._displayDefinition);
            argList.SetParameter("DisplayBB", string.Empty, (this._displayBestBetTitle | this._displayUrl) | this._displayDescription);
            argList.SetParameter("DisplayHC", string.Empty, ((this._displayHCDescription | this._displayHCImage) | this._displayHCProps) | this._displayHCTitle);
            argList.SetParameter("IsDesignMode", string.Empty, base.DesignMode ? "True" : "False");
            bool hasSpecialTermInformation             = false;
            bool hasBestBetResults                     = false;
            HighConfidenceResultsDataSource dataSource = this.DataSource as HighConfidenceResultsDataSource;

            if (dataSource == null)
            {
                throw new ArgumentOutOfRangeException();
            }
            HighConfidenceResultsDataSourceView view = dataSource.GetView() as HighConfidenceResultsDataSourceView;

            if (view == null)
            {
                throw new ArgumentOutOfRangeException();
            }
            if (view.ResultsXml != null)
            {
                XmlNode node = view.ResultsXml.SelectSingleNode("/All_Results/SpecialTermInformation");
                if ((node != null) && node.HasChildNodes)
                {
                    hasSpecialTermInformation = true;
                }
                node = view.ResultsXml.SelectSingleNode("/All_Results/BestBetResults");
                if ((node != null) && node.HasChildNodes)
                {
                    hasBestBetResults = true;
                }
            }
            if (((this.DisplayTerm || this.DisplayDefinition) && hasSpecialTermInformation) || (((this.DisplayBestBetTitle || this.DisplayDescription) || this.DisplayUrl) && hasBestBetResults))
            {
                argList.SetParameter("BestBetTitle", string.Empty, "SearchBestBetResult_Title");
            }

            bool isfirstPage = _qdra[0].StartItem == 0;

            argList.SetParameter("IsFirstPage", string.Empty, isfirstPage);
        }
        public HighConfidenceResultsDataSourceView(HighConfidenceResultsDataSource dataSourceOwner, string viewName)
            : base(dataSourceOwner, viewName)
        {
            if (dataSourceOwner == null)
            {
                throw new ArgumentNullException("dataSourceOwner");
            }
            HighConfidenceResultsDataSource source = base.DataSourceOwner as HighConfidenceResultsDataSource;

            if (source == null)
            {
                throw new ArgumentOutOfRangeException();
            }
            HighConfidencePartialMatchWebPart parentWebpart = source.ParentWebpart as HighConfidencePartialMatchWebPart;

            if (parentWebpart == null)
            {
                throw new ArgumentOutOfRangeException();
            }
            base.QueryManager = SharedQueryManager.GetInstance(parentWebpart.Page, parentWebpart.QueryID).QueryManager;
        }