public bool Validate(out string message)
        {
            message = null;
            if (CompareWithInvariantCulture(m_validationNamespace, base.NamespaceURI, ignoreCase: false) != 0)
            {
                return(true);
            }
            XmlSchemaComplexType xmlSchemaComplexType = null;
            bool      result    = true;
            ArrayList arrayList = new ArrayList();

            switch (base.NodeType)
            {
            case XmlNodeType.Element:
            {
                if (m_rdlElementStack == null)
                {
                    m_rdlElementStack = new RdlElementStack();
                }
                xmlSchemaComplexType = (base.SchemaType as XmlSchemaComplexType);
                if (xmlSchemaComplexType != null)
                {
                    TraverseParticle(xmlSchemaComplexType.ContentTypeParticle, arrayList);
                }
                if (!base.IsEmptyElement)
                {
                    if (xmlSchemaComplexType != null && 1 < arrayList.Count && CompareWithInvariantCulture("ReportItemsType", xmlSchemaComplexType.Name, ignoreCase: false) != 0 && CompareWithInvariantCulture("MapLayersType", xmlSchemaComplexType.Name, ignoreCase: false) != 0)
                    {
                        Hashtable hashtable2 = new Hashtable(arrayList.Count);
                        hashtable2.Add("_ParentName", base.LocalName);
                        hashtable2.Add("_Type", xmlSchemaComplexType);
                        m_rdlElementStack.Add(hashtable2);
                    }
                    else
                    {
                        m_rdlElementStack.Add(null);
                    }
                }
                else if (xmlSchemaComplexType != null)
                {
                    for (int j = 0; j < arrayList.Count; j++)
                    {
                        XmlSchemaElement xmlSchemaElement2 = arrayList[j] as XmlSchemaElement;
                        if (xmlSchemaElement2.MinOccurs > 0m)
                        {
                            result  = false;
                            message = RDLValidatingReaderStrings.rdlValidationMissingChildElement(base.LocalName, xmlSchemaElement2.Name, base.LineNumber.ToString(CultureInfo.InvariantCulture.NumberFormat), base.LinePosition.ToString(CultureInfo.InvariantCulture.NumberFormat));
                        }
                    }
                }
                if (0 >= base.Depth || m_rdlElementStack == null)
                {
                    break;
                }
                Hashtable hashtable3 = m_rdlElementStack[base.Depth - 1];
                if (hashtable3 != null)
                {
                    if (hashtable3.ContainsKey(base.LocalName))
                    {
                        result  = false;
                        message = RDLValidatingReaderStrings.rdlValidationInvalidElement(hashtable3["_ParentName"] as string, base.LocalName, base.LineNumber.ToString(CultureInfo.InvariantCulture.NumberFormat), base.LinePosition.ToString(CultureInfo.InvariantCulture.NumberFormat));
                    }
                    else
                    {
                        hashtable3.Add(base.LocalName, null);
                    }
                }
                break;
            }

            case XmlNodeType.EndElement:
            {
                if (m_rdlElementStack == null)
                {
                    break;
                }
                Hashtable hashtable = m_rdlElementStack[m_rdlElementStack.Count - 1];
                if (hashtable != null)
                {
                    xmlSchemaComplexType = (hashtable["_Type"] as XmlSchemaComplexType);
                    TraverseParticle(xmlSchemaComplexType.ContentTypeParticle, arrayList);
                    for (int i = 0; i < arrayList.Count; i++)
                    {
                        XmlSchemaElement xmlSchemaElement = arrayList[i] as XmlSchemaElement;
                        if (xmlSchemaElement.MinOccurs > 0m && !hashtable.ContainsKey(xmlSchemaElement.Name))
                        {
                            result  = false;
                            message = RDLValidatingReaderStrings.rdlValidationMissingChildElement(base.LocalName, xmlSchemaElement.Name, base.LineNumber.ToString(CultureInfo.InvariantCulture.NumberFormat), base.LinePosition.ToString(CultureInfo.InvariantCulture.NumberFormat));
                        }
                    }
                    m_rdlElementStack[m_rdlElementStack.Count - 1] = null;
                }
                m_rdlElementStack.RemoveAt(m_rdlElementStack.Count - 1);
                break;
            }
            }
            return(result);
        }
        public bool ValidateStartElement(out string message)
        {
            message = null;
            XmlSchemaComplexType xmlSchemaComplexType = null;
            ArrayList            arrayList            = null;

            if (m_rdlElementStack == null)
            {
                m_rdlElementStack = new RdlElementStack();
            }
            if (m_reader.SchemaInfo != null && m_validationNamespaces.Contains(m_reader.NamespaceURI))
            {
                xmlSchemaComplexType = (m_reader.SchemaInfo.SchemaType as XmlSchemaComplexType);
            }
            if (xmlSchemaComplexType != null)
            {
                arrayList = new ArrayList();
                TraverseParticle(xmlSchemaComplexType.ContentTypeParticle, arrayList);
            }
            if (xmlSchemaComplexType != null && 1 < arrayList.Count && "MapLayersType" != xmlSchemaComplexType.Name && "ReportItemsType" != xmlSchemaComplexType.Name)
            {
                Hashtable hashtable = new Hashtable(arrayList.Count);
                hashtable.Add("_ParentName", m_reader.LocalName);
                hashtable.Add("_Type", xmlSchemaComplexType);
                m_rdlElementStack.Add(hashtable);
            }
            else
            {
                m_rdlElementStack.Add(null);
            }
            if (0 < m_reader.Depth && m_rdlElementStack != null)
            {
                Hashtable hashtable2 = m_rdlElementStack[m_reader.Depth - 1];
                if (hashtable2 != null)
                {
                    if (hashtable2.ContainsKey(m_reader.LocalName))
                    {
                        message = ValidationMessage("rdlValidationInvalidElement", (string)hashtable2["_ParentName"], m_reader.LocalName);
                        return(false);
                    }
                    hashtable2.Add(m_reader.LocalName, null);
                }
            }
            string text = (m_reader.GetAttribute("MustUnderstand") ?? string.Empty).Trim();

            if (!string.IsNullOrEmpty(text))
            {
                string[] array = text.Split();
                foreach (string text2 in array)
                {
                    string text3 = m_reader.LookupNamespace(text2);
                    if (!m_validationNamespaces.Contains(text3))
                    {
                        int          num  = 0;
                        int          num2 = 0;
                        IXmlLineInfo obj  = (IXmlLineInfo)m_reader;
                        num     = obj.LineNumber;
                        message = RDLValidatingReaderStrings.rdlValidationUnknownRequiredNamespaces(position: obj.LinePosition.ToString(CultureInfo.InvariantCulture.NumberFormat), xmlns: text2, prefix: text3, sqlServerVersionName: "Microsoft SQL Server 2019 Community Technology Preview 2.3", linenumber: num.ToString(CultureInfo.InvariantCulture.NumberFormat));
                        return(false);
                    }
                }
            }
            return(true);
        }