Прочетете на английски Редактиране

Споделяне чрез


XmlDictionaryReader.CreateTextReader Method

Definition

Creates an instance of XmlDictionaryReader.

Overloads

Remarks

These overloads create an instance of XmlDictionaryReader.

CreateTextReader(Stream, Encoding, XmlDictionaryReaderQuotas, OnXmlDictionaryReaderClose)

Source:
XmlDictionaryReader.cs
Source:
XmlDictionaryReader.cs
Source:
XmlDictionaryReader.cs

Creates an instance of XmlDictionaryReader.

public static System.Xml.XmlDictionaryReader CreateTextReader (System.IO.Stream stream, System.Text.Encoding encoding, System.Xml.XmlDictionaryReaderQuotas quotas, System.Xml.OnXmlDictionaryReaderClose onClose);
public static System.Xml.XmlDictionaryReader CreateTextReader (System.IO.Stream stream, System.Text.Encoding? encoding, System.Xml.XmlDictionaryReaderQuotas quotas, System.Xml.OnXmlDictionaryReaderClose? onClose);

Parameters

stream
Stream

The stream from which to read.

encoding
Encoding

The Encoding object that specifies the encoding properties to apply.

onClose
OnXmlDictionaryReaderClose

The delegate to be called when the reader is closed.

Returns

An instance of XmlDictionaryReader.

Remarks

The reader created is optimized for reading UTF-8 text.

Applies to

.NET 9 и други версии
Продукт Версии
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1
UWP 10.0

CreateTextReader(Byte[], XmlDictionaryReaderQuotas)

Source:
XmlDictionaryReader.cs
Source:
XmlDictionaryReader.cs
Source:
XmlDictionaryReader.cs

Creates an instance of XmlDictionaryReader.

public static System.Xml.XmlDictionaryReader CreateTextReader (byte[] buffer, System.Xml.XmlDictionaryReaderQuotas quotas);

Parameters

buffer
Byte[]

The buffer from which to read.

quotas
XmlDictionaryReaderQuotas

The quotas applied to the reader.

Returns

An instance of XmlDictionaryReader.

Exceptions

buffer is null.

Remarks

The reader created is optimized for reading UTF-8 text.

Applies to

.NET 9 и други версии
Продукт Версии
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1
UWP 10.0

CreateTextReader(Stream, XmlDictionaryReaderQuotas)

Source:
XmlDictionaryReader.cs
Source:
XmlDictionaryReader.cs
Source:
XmlDictionaryReader.cs

Creates an instance of XmlDictionaryReader.

public static System.Xml.XmlDictionaryReader CreateTextReader (System.IO.Stream stream, System.Xml.XmlDictionaryReaderQuotas quotas);

Parameters

stream
Stream

The stream from which to read.

quotas
XmlDictionaryReaderQuotas

The quotas applied to the reader.

Returns

An instance of XmlDictionaryReader.

Remarks

The reader created is optimized for reading UTF-8 text.

Applies to

.NET 9 и други версии
Продукт Версии
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1
UWP 10.0

CreateTextReader(Byte[], Int32, Int32, XmlDictionaryReaderQuotas)

Source:
XmlDictionaryReader.cs
Source:
XmlDictionaryReader.cs
Source:
XmlDictionaryReader.cs

Creates an instance of XmlDictionaryReader.

public static System.Xml.XmlDictionaryReader CreateTextReader (byte[] buffer, int offset, int count, System.Xml.XmlDictionaryReaderQuotas quotas);

Parameters

buffer
Byte[]

The buffer from which to read.

offset
Int32

The starting position from which to read in buffer.

count
Int32

The number of bytes that can be read from buffer.

quotas
XmlDictionaryReaderQuotas

The quotas applied to the reader.

Returns

An instance of XmlDictionaryReader.

Remarks

The reader created is optimized for reading UTF-8 text.

Applies to

.NET 9 и други версии
Продукт Версии
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1
UWP 10.0

CreateTextReader(Byte[], Int32, Int32, Encoding, XmlDictionaryReaderQuotas, OnXmlDictionaryReaderClose)

Source:
XmlDictionaryReader.cs
Source:
XmlDictionaryReader.cs
Source:
XmlDictionaryReader.cs

Creates an instance of XmlDictionaryReader.

public static System.Xml.XmlDictionaryReader CreateTextReader (byte[] buffer, int offset, int count, System.Text.Encoding? encoding, System.Xml.XmlDictionaryReaderQuotas quotas, System.Xml.OnXmlDictionaryReaderClose? onClose);
public static System.Xml.XmlDictionaryReader CreateTextReader (byte[] buffer, int offset, int count, System.Text.Encoding encoding, System.Xml.XmlDictionaryReaderQuotas quotas, System.Xml.OnXmlDictionaryReaderClose onClose);

Parameters

buffer
Byte[]

The buffer from which to read.

offset
Int32

The starting position from which to read in buffer.

count
Int32

The number of bytes that can be read from buffer.

encoding
Encoding

The Encoding object that specifies the encoding properties to apply.

onClose
OnXmlDictionaryReaderClose

The delegate to be called when the reader is closed.

Returns

An instance of XmlDictionaryReader.

Remarks

The reader created is optimized for reading UTF-8 text.

Applies to

.NET 9 и други версии
Продукт Версии
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1