IXmlJsonReaderInitializer.SetInput Método
Definição
Reinicializar um leitor habilitado para JSON (JavaScript Object Notation) para um buffer ou fluxo especificado que contém dados codificados em JSON.Reinitializes a JavaScript Object Notation (JSON) enabled reader to a specified stream or buffer that contains JSON-encoded data.
Sobrecargas
| SetInput(Stream, Encoding, XmlDictionaryReaderQuotas, OnXmlDictionaryReaderClose) |
Reinicializa um leitor habilitado para JSON (JavaScript Object Notation) para um fluxo especificado que contém dados codificados em JSON.Reinitializes a JavaScript Object Notation (JSON) enabled reader to a specified stream that contains JSON-encoded data. |
| SetInput(Byte[], Int32, Int32, Encoding, XmlDictionaryReaderQuotas, OnXmlDictionaryReaderClose) |
Reinicializa um leitor habilitado para JSON (JavaScript Object Notation) para um buffer especificado que contém dados codificados em JSON.Reinitializes a JavaScript Object Notation (JSON) enabled reader to a specified buffer that contains JSON-encoded data. |
Comentários
Os XmlDictionaryReader objetos criados por um dos CreateJsonReader métodos implementam essa interface e estão prontos para ler dados codificados em JSON.The XmlDictionaryReader objects created by one of the CreateJsonReader methods implement this interface and are ready to read JSON-encoded data. Mas, se um usuário quiser reutilizar o mesmo XmlDictionaryReader objeto para ler outros dados codificados em JSON, o leitor deverá ser inicializado para o segundo conjunto a ser lido usando um dos SetInput métodos.But if a user wants to reuse the same XmlDictionaryReader object to read other JSON-encoded data, then the reader must be initialized to the second dataset to be read by using the one of the SetInput methods.
O MaxBytesPerRead valor definido como parte do quotas parâmetro limita apenas a quantidade de informações que estão sendo lidas na memória quando a entrada está sendo lida de um fluxo com o SetInput(Stream, Encoding, XmlDictionaryReaderQuotas, OnXmlDictionaryReaderClose) método e não é imposta quando o SetInput(Byte[], Int32, Int32, Encoding, XmlDictionaryReaderQuotas, OnXmlDictionaryReaderClose) método é usado para ler informações de um buffer.The MaxBytesPerRead value set as part of the quotas parameter only limits the amount of information being read into memory when the input is being read from a stream with the SetInput(Stream, Encoding, XmlDictionaryReaderQuotas, OnXmlDictionaryReaderClose) method and is not enforced when the SetInput(Byte[], Int32, Int32, Encoding, XmlDictionaryReaderQuotas, OnXmlDictionaryReaderClose) method is used to read information from a buffer. Os limites no número de atributos que podem ser carregados não são relevantes para o contexto JSON.The limits on the number of attributes that can be loaded are not relevant to the JSON context.
SetInput(Stream, Encoding, XmlDictionaryReaderQuotas, OnXmlDictionaryReaderClose)
Reinicializa um leitor habilitado para JSON (JavaScript Object Notation) para um fluxo especificado que contém dados codificados em JSON.Reinitializes a JavaScript Object Notation (JSON) enabled reader to a specified stream that contains JSON-encoded data.
public:
void SetInput(System::IO::Stream ^ stream, System::Text::Encoding ^ encoding, System::Xml::XmlDictionaryReaderQuotas ^ quotas, System::Xml::OnXmlDictionaryReaderClose ^ onClose);
public void SetInput (System.IO.Stream stream, System.Text.Encoding? encoding, System.Xml.XmlDictionaryReaderQuotas quotas, System.Xml.OnXmlDictionaryReaderClose? onClose);
public void SetInput (System.IO.Stream stream, System.Text.Encoding encoding, System.Xml.XmlDictionaryReaderQuotas quotas, System.Xml.OnXmlDictionaryReaderClose onClose);
abstract member SetInput : System.IO.Stream * System.Text.Encoding * System.Xml.XmlDictionaryReaderQuotas * System.Xml.OnXmlDictionaryReaderClose -> unit
Public Sub SetInput (stream As Stream, encoding As Encoding, quotas As XmlDictionaryReaderQuotas, onClose As OnXmlDictionaryReaderClose)
Parâmetros
- quotas
- XmlDictionaryReaderQuotas
XmlDictionaryReaderQuotas a ser aplicado.XmlDictionaryReaderQuotas to apply.
- onClose
- OnXmlDictionaryReaderClose
O delegado a chamar quando o leitor estiver fechado.Delegate to call when the reader is closed.
Comentários
Um XmlDictionaryReader objeto que lê fluxos codificados em JSON pode ser reutilizado chamando o SetInput(Stream, Encoding, XmlDictionaryReaderQuotas, OnXmlDictionaryReaderClose) método para reinicializá-lo.A XmlDictionaryReader object that reads JSON-encoded streams can be reused by calling the SetInput(Stream, Encoding, XmlDictionaryReaderQuotas, OnXmlDictionaryReaderClose) method to reinitialize it.
O leitor pode interpretar as codificações UTF-8 e UTF-16 (Big-ou little-endian).The reader can interpret the UTF-8 and the UTF-16 (big- or little-endian) encodings. O leitor usará a codificação definida no momento da inicialização se uma for passada ou a codificação for detectada automaticamente se null for passada.The reader uses the encoding set at initialization time if one is passed or the encoding is automatically detected if null is passed.
O MaxBytesPerRead valor definido como parte do quotas parâmetro limita apenas a quantidade de informações que estão sendo lidas na memória quando a entrada está sendo lida de um fluxo com o SetInput(Stream, Encoding, XmlDictionaryReaderQuotas, OnXmlDictionaryReaderClose) método e não é imposta quando o SetInput(Byte[], Int32, Int32, Encoding, XmlDictionaryReaderQuotas, OnXmlDictionaryReaderClose) método é usado para ler informações de um buffer.The MaxBytesPerRead value set as part of the quotas parameter only limits the amount of information being read into memory when the input is being read from a stream with the SetInput(Stream, Encoding, XmlDictionaryReaderQuotas, OnXmlDictionaryReaderClose) method and is not enforced when the SetInput(Byte[], Int32, Int32, Encoding, XmlDictionaryReaderQuotas, OnXmlDictionaryReaderClose) method is used to read information from a buffer. Os limites no número de atributos que podem ser carregados não são relevantes para o contexto JSON.The limits on the number of attributes that can be loaded are not relevant to the JSON context.
Aplica-se a
SetInput(Byte[], Int32, Int32, Encoding, XmlDictionaryReaderQuotas, OnXmlDictionaryReaderClose)
Reinicializa um leitor habilitado para JSON (JavaScript Object Notation) para um buffer especificado que contém dados codificados em JSON.Reinitializes a JavaScript Object Notation (JSON) enabled reader to a specified buffer that contains JSON-encoded data.
public:
void SetInput(cli::array <System::Byte> ^ buffer, int offset, int count, System::Text::Encoding ^ encoding, System::Xml::XmlDictionaryReaderQuotas ^ quotas, System::Xml::OnXmlDictionaryReaderClose ^ onClose);
public void SetInput (byte[] buffer, int offset, int count, System.Text.Encoding? encoding, System.Xml.XmlDictionaryReaderQuotas quotas, System.Xml.OnXmlDictionaryReaderClose? onClose);
public void SetInput (byte[] buffer, int offset, int count, System.Text.Encoding encoding, System.Xml.XmlDictionaryReaderQuotas quotas, System.Xml.OnXmlDictionaryReaderClose onClose);
abstract member SetInput : byte[] * int * int * System.Text.Encoding * System.Xml.XmlDictionaryReaderQuotas * System.Xml.OnXmlDictionaryReaderClose -> unit
Public Sub SetInput (buffer As Byte(), offset As Integer, count As Integer, encoding As Encoding, quotas As XmlDictionaryReaderQuotas, onClose As OnXmlDictionaryReaderClose)
Parâmetros
- buffer
- Byte[]
A matriz do buffer Byte de entrada para leitura.The input Byte buffer array from which to read.
- offset
- Int32
A posição inicial da qual será feita a leitura no buffer.The starting position from which to read in buffer.
- count
- Int32
O número de bytes que podem ser lidos de buffer.The number of bytes that can be read from buffer.
- quotas
- XmlDictionaryReaderQuotas
O XmlDictionaryReaderQuotas a ser aplicado.The XmlDictionaryReaderQuotas to apply.
- onClose
- OnXmlDictionaryReaderClose
O delegado do OnXmlDictionaryReaderClose a chamar quando o leitor estiver fechado.The OnXmlDictionaryReaderClose delegate to call when the reader is closed.
Comentários
Um XmlDictionaryReader objeto que lê um buffer codificado em JSON Byte pode ser reutilizado chamando o SetInput(Byte[], Int32, Int32, Encoding, XmlDictionaryReaderQuotas, OnXmlDictionaryReaderClose) método para reinicializá-lo.A XmlDictionaryReader object that reads a JSON-encoded buffered Byte can be reused by calling the SetInput(Byte[], Int32, Int32, Encoding, XmlDictionaryReaderQuotas, OnXmlDictionaryReaderClose) method to reinitialize it.
O leitor pode interpretar as codificações UTF-8 e UTF-16 (Big-ou little-endian).The reader can interpret the UTF-8 and the UTF-16 (big- or little-endian) encodings. O leitor usará a codificação definida no momento da inicialização se uma for passada ou a codificação for detectada automaticamente se null for passada.The reader uses the encoding set at initialization time if one is passed or the encoding is automatically detected if null is passed.
O MaxBytesPerRead valor definido como parte do quotas parâmetro limita apenas a quantidade de informações que estão sendo lidas na memória quando a entrada está sendo lida de um fluxo com o SetInput(Stream, Encoding, XmlDictionaryReaderQuotas, OnXmlDictionaryReaderClose) método e não é imposta quando o SetInput(Byte[], Int32, Int32, Encoding, XmlDictionaryReaderQuotas, OnXmlDictionaryReaderClose) método é usado para ler informações de um buffer.The MaxBytesPerRead value set as part of the quotas parameter only limits the amount of information being read into memory when the input is being read from a stream with the SetInput(Stream, Encoding, XmlDictionaryReaderQuotas, OnXmlDictionaryReaderClose) method and is not enforced when the SetInput(Byte[], Int32, Int32, Encoding, XmlDictionaryReaderQuotas, OnXmlDictionaryReaderClose) method is used to read information from a buffer. Os limites no número de atributos que podem ser carregados não são relevantes para o contexto JSON.The limits on the number of attributes that can be loaded are not relevant to the JSON context.