public static string Get2005NamespaceURI()
 {
     return(RdlUpgrader.Get2005NamespaceURI());
 }
        public static RDLUpgradeResult CheckForDundasCRI(XmlTextReader xmlTextReader)
        {
            RDLUpgradeResult rDLUpgradeResult = new RDLUpgradeResult();

            try
            {
                xmlTextReader.MoveToContent();
                if (xmlTextReader.NamespaceURI.Equals(RdlUpgrader.Get2005NamespaceURI(), StringComparison.OrdinalIgnoreCase))
                {
                    while (xmlTextReader.ReadToFollowing("CustomReportItem"))
                    {
                        bool flag   = false;
                        bool flag2  = false;
                        bool flag3  = false;
                        bool flag4  = false;
                        bool flag5  = false;
                        bool flag6  = false;
                        bool flag7  = false;
                        bool flag8  = false;
                        bool flag9  = false;
                        bool flag10 = false;
                        bool flag11 = false;
                        xmlTextReader.ReadStartElement();
                        do
                        {
                            if (xmlTextReader.NodeType == XmlNodeType.Element)
                            {
                                if (xmlTextReader.Name == "Type")
                                {
                                    string text = xmlTextReader.ReadInnerXml();
                                    flag  = text.Equals("DUNDASCHARTCONTROL", StringComparison.OrdinalIgnoreCase);
                                    flag2 = text.Equals("DUNDASGAUGECONTROL", StringComparison.OrdinalIgnoreCase);
                                    if (!flag && !flag2)
                                    {
                                        break;
                                    }
                                }
                                else if (xmlTextReader.Name == "CustomProperties")
                                {
                                    xmlTextReader.ReadStartElement();
                                    do
                                    {
                                        if (xmlTextReader.Name == "Name")
                                        {
                                            string text2 = xmlTextReader.ReadInnerXml();
                                            if (text2.StartsWith("CHART.ANNOTATIONS.", StringComparison.OrdinalIgnoreCase))
                                            {
                                                flag3 = true;
                                            }
                                            if (text2.StartsWith("CHART.LEGENDS", StringComparison.OrdinalIgnoreCase) && (text2.IndexOf("LEGEND.CUSTOMITEMS.", StringComparison.OrdinalIgnoreCase) > 0 || text2.IndexOf("LEGEND.CELLCOLUMNS.", StringComparison.OrdinalIgnoreCase) > 0))
                                            {
                                                flag4 = true;
                                            }
                                            if (text2.StartsWith("GAUGECORE.NUMERICINDICATORS.", StringComparison.OrdinalIgnoreCase))
                                            {
                                                flag5 = true;
                                            }
                                            if (text2.StartsWith("GAUGECORE.STATEINDICATORS.", StringComparison.OrdinalIgnoreCase))
                                            {
                                                flag6 = true;
                                            }
                                            if (text2.StartsWith("GAUGECORE.NAMEDIMAGES.", StringComparison.OrdinalIgnoreCase) || text2.StartsWith("GAUGECORE.IMAGES.", StringComparison.OrdinalIgnoreCase))
                                            {
                                                flag7 = true;
                                            }
                                            if (text2.StartsWith("CUSTOM_CODE_CS", StringComparison.OrdinalIgnoreCase) || text2.StartsWith("CUSTOM_CODE_VB", StringComparison.OrdinalIgnoreCase) || text2.StartsWith("CUSTOM_CODE_COMPILED_ASSEMBLY", StringComparison.OrdinalIgnoreCase))
                                            {
                                                flag8 = true;
                                            }
                                        }
                                    }while ((!(xmlTextReader.Name == "CustomProperties") || xmlTextReader.NodeType != XmlNodeType.EndElement) && xmlTextReader.Read());
                                }
                                else if (xmlTextReader.Name == "CustomData")
                                {
                                    bool flag12 = false;
                                    bool flag13 = false;
                                    xmlTextReader.ReadStartElement();
                                    do
                                    {
                                        if (xmlTextReader.Name == "DataRowGroupings")
                                        {
                                            if (xmlTextReader.NodeType == XmlNodeType.Element)
                                            {
                                                flag12 = true;
                                            }
                                            else if (xmlTextReader.NodeType == XmlNodeType.EndElement)
                                            {
                                                flag12 = false;
                                            }
                                        }
                                        else if (flag12 && xmlTextReader.Name == "Name")
                                        {
                                            string text3 = xmlTextReader.ReadInnerXml();
                                            if (text3.Equals("ERRORFORMULA:BOXPLOT", StringComparison.OrdinalIgnoreCase) || text3.Equals("FINANCIALFORMULA:FORECASTING", StringComparison.OrdinalIgnoreCase))
                                            {
                                                flag9 = true;
                                            }
                                            if (text3.StartsWith("ERRORFORMULA", StringComparison.OrdinalIgnoreCase) || text3.StartsWith("FINANCIALFORMULA", StringComparison.OrdinalIgnoreCase) || text3.StartsWith("STATISTICALFORMULA", StringComparison.OrdinalIgnoreCase))
                                            {
                                                xmlTextReader.Skip();
                                                string[] array  = xmlTextReader.ReadInnerXml().Split(';');
                                                string[] array2 = array;
                                                foreach (string text4 in array2)
                                                {
                                                    if (text4.Trim().StartsWith("SECONDARYAXIS", StringComparison.OrdinalIgnoreCase))
                                                    {
                                                        flag10 = true;
                                                    }
                                                }
                                            }
                                        }
                                        else if (xmlTextReader.Name == "DataRows")
                                        {
                                            if (xmlTextReader.NodeType == XmlNodeType.Element)
                                            {
                                                flag13 = true;
                                            }
                                            else if (xmlTextReader.NodeType == XmlNodeType.EndElement)
                                            {
                                                flag13 = false;
                                            }
                                        }
                                        else if (flag13 && xmlTextReader.Name == "Name")
                                        {
                                            string text5 = xmlTextReader.ReadInnerXml();
                                            if (text5.StartsWith("CUSTOMVALUE:", StringComparison.OrdinalIgnoreCase))
                                            {
                                                flag11 = true;
                                            }
                                        }
                                    }while ((!(xmlTextReader.Name == "CustomData") || xmlTextReader.NodeType != XmlNodeType.EndElement) && xmlTextReader.Read());
                                }
                            }
                            xmlTextReader.Skip();
                        }while (xmlTextReader.NodeType != XmlNodeType.EndElement);
                        if (flag)
                        {
                            if (flag3 || flag4 || flag8 || flag9 || flag10 || flag11)
                            {
                                rDLUpgradeResult.HasUnsupportedDundasChartFeatures = true;
                            }
                        }
                        else if (flag2 && (flag5 || flag6 || flag7 || flag8))
                        {
                            rDLUpgradeResult.HasUnsupportedDundasGaugeFeatures = true;
                        }
                    }
                    return(rDLUpgradeResult);
                }
                return(rDLUpgradeResult);
            }
            catch
            {
                return(rDLUpgradeResult);
            }
        }