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

LoadXmlReader3() private method

private LoadXmlReader3 ( ) : void
return void
        public void LoadXmlReader3()
        {
            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;
            try
            {
                xslt.Load(xrTemp);
            }
            catch (Exception ex)
            {
                fTEST_FAIL = true;
                throw (ex);
            }
            finally
            {
                if (!fTEST_FAIL || (xrTemp.ReadState != ReadState.Closed))
                    fTEST_FAIL = false;
                xrTemp.Dispose();
            }
            if (fTEST_FAIL)
            {
                _output.WriteLine("Appear to have accidently closed the Reader");
                Assert.True(false);
            }
            return;
        }