XmlDictionaryReaderQuotas.MaxStringContentLength Propriedade

Definição

Obtém ou define o tamanho máximo da cadeia de caracteres retornada pelo leitor.Gets or sets the maximum string length returned by the reader.

public:
 property int MaxStringContentLength { int get(); void set(int value); };
public int MaxStringContentLength { get; set; }
member this.MaxStringContentLength : int with get, set
Public Property MaxStringContentLength As Integer

Valor da propriedade

Int32

O tamanho máximo da cadeia de caracteres retornado pelo leitor.The maximum string length returned by the reader. O padrão é 8192.The default is 8192.

Exceções

Tentando o valor set, mas valores de cota são somente leitura para esta instância.Trying to set the value, but quota values are read-only for this instance.

Tentando set o valor para menor que zero.Trying to set the value to less than zero.

Comentários

Essa cota limita o comprimento de cadeias de caracteres que são criadas e retornadas por várias APIs.This quota limits the length of strings that are created and returned by various APIs. Ao chamar Read () e verificar a Value propriedade, o leitor marca os valores da cadeia de caracteres em partes gerenciáveis (quando estiver no modo de streaming).When calling Read() and checking the Value property, the reader chunks string values into manageable pieces (when in streaming mode). No entanto, chamar ReadContentAsString () concatena todas essas partes e retorna uma cadeia de caracteres grande.However, calling ReadContentAsString() concatenates all these pieces and return one large string. No formato binário, se o valor de um nó de elemento for uma sequência de IDs de cadeia de caracteres de dicionário, os valores dessas cadeias de seqüências serão concatenados.In the binary format, if the value of an element node is a sequence of dictionary string IDs then the values of those strings are concatenated. Isso pode ser uma expansão extremamente grande e é mitigado por esse limite.This can be an extremely large expansion and is mitigated by this limit.

Aplica-se a