System.Xml.XmlUTF8TextReader.SetInput C# (CSharp) Méthode

SetInput() public méthode

public SetInput ( Stream stream, Encoding encoding, XmlDictionaryReaderQuotas quotas, OnXmlDictionaryReaderClose onClose ) : void
stream Stream
encoding Encoding
quotas XmlDictionaryReaderQuotas
onClose OnXmlDictionaryReaderClose
Résultat void
        public void SetInput(Stream stream, Encoding encoding, XmlDictionaryReaderQuotas quotas, OnXmlDictionaryReaderClose onClose)
        {
            if (stream == null)
                throw System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull(nameof(stream));
            MoveToInitial(quotas, onClose);
            stream = new EncodingStreamWrapper(stream, encoding);
            BufferReader.SetBuffer(stream, null, null);
            _buffered = false;
        }

Same methods

XmlUTF8TextReader::SetInput ( byte buffer, int offset, int count, Encoding encoding, XmlDictionaryReaderQuotas quotas, OnXmlDictionaryReaderClose onClose ) : void

Usage Example

 static public XmlDictionaryReader CreateTextReader(Stream stream, Encoding encoding,
                                                    XmlDictionaryReaderQuotas quotas,
                                                    OnXmlDictionaryReaderClose onClose)
 {
     XmlUTF8TextReader reader = new XmlUTF8TextReader();
     reader.SetInput(stream, encoding, quotas, onClose);
     return reader;
 }
All Usage Examples Of System.Xml.XmlUTF8TextReader::SetInput