System.Xml.Tests.CLoadReaderTest.LoadXmlReader5 C# (CSharp) Method

LoadXmlReader5() private method

private LoadXmlReader5 ( ) : void
return void
        public void LoadXmlReader5()
        {
            Boolean fTEST_FAIL = false;
#pragma warning disable 0618
            xslt = new XslTransform();

            XmlValidatingReader xrTemp = new XmlValidatingReader(new XmlTextReader(FullFilePath("showParam.xsl")));
#pragma warning restore 0618
            xrTemp.ValidationType = ValidationType.None;
            xrTemp.EntityHandling = EntityHandling.ExpandEntities;
            xslt.Load(xrTemp);
            try
            {
                xslt.Load(xrTemp);  // should now be at end and should give exception
                fTEST_FAIL = true;
            }
            catch (System.Xml.Xsl.XsltCompileException e)
            {
                CheckExpectedError(e.InnerException, "system.xml", "Xslt_WrongStylesheetElement", new string[] { "" });
            }
            finally
            {
                xrTemp.Dispose();
            }
            if (fTEST_FAIL)
                Assert.True(false);
            return;
        }