System.Xml.XmlValidatingReaderImpl.XmlValidatingReaderImpl C# (CSharp) Method

XmlValidatingReaderImpl() private method

private XmlValidatingReaderImpl ( XmlReader reader ) : System
reader XmlReader
return System
        internal XmlValidatingReaderImpl(XmlReader reader)
        {
            XmlAsyncCheckReader asyncCheckReader = reader as XmlAsyncCheckReader;
            if (asyncCheckReader != null)
            {
                reader = asyncCheckReader.CoreReader;
            }
            _outerReader = this;
            _coreReader = reader;
            _coreReaderNSResolver = reader as IXmlNamespaceResolver;
            _coreReaderImpl = reader as XmlTextReaderImpl;
            if (_coreReaderImpl == null)
            {
                XmlTextReader tr = reader as XmlTextReader;
                if (tr != null)
                {
                    _coreReaderImpl = tr.Impl;
                }
            }
            if (_coreReaderImpl == null)
            {
                throw new ArgumentException(SR.Arg_ExpectingXmlTextReader, nameof(reader));
            }
            _coreReaderImpl.EntityHandling = EntityHandling.ExpandEntities;
            _coreReaderImpl.XmlValidatingReaderCompatibilityMode = true;
            _processIdentityConstraints = true;

#pragma warning disable 618
            _schemaCollection = new XmlSchemaCollection(_coreReader.NameTable);
            _schemaCollection.XmlResolver = GetResolver();

            _eventHandling = new ValidationEventHandling(this);
            _coreReaderImpl.ValidationEventHandling = _eventHandling;
            _coreReaderImpl.OnDefaultAttributeUse = new XmlTextReaderImpl.OnDefaultAttributeUseDelegate(ValidateDefaultAttributeOnUse);

            _validationType = ValidationType.Auto;
            SetupValidation(ValidationType.Auto);
#pragma warning restore 618

        }

Same methods

XmlValidatingReaderImpl::XmlValidatingReaderImpl ( Stream xmlFragment, XmlNodeType fragType, XmlParserContext context ) : System
XmlValidatingReaderImpl::XmlValidatingReaderImpl ( XmlReader reader, ValidationEventHandler settingsEventHandler, bool processIdentityConstraints ) : System
XmlValidatingReaderImpl::XmlValidatingReaderImpl ( string xmlFragment, XmlNodeType fragType, XmlParserContext context ) : System