AsnReader.TryReadInt32(Int32, Nullable<Asn1Tag>) Método
Definição
Tenta ler o próximo valor como Inteiro com uma marca especificada, como um valor de 32 bits assinado.Attempts to read the next value as an Integer with a specified tag, as a signed 32-bit value.
public bool TryReadInt32 (out int value, System.Formats.Asn1.Asn1Tag? expectedTag = default);
member this.TryReadInt32 : int * Nullable<System.Formats.Asn1.Asn1Tag> -> bool
Public Function TryReadInt32 (ByRef value As Integer, Optional expectedTag As Nullable(Of Asn1Tag) = Nothing) As Boolean
Parâmetros
- value
- Int32
Em caso de sucesso, recebe o valor decodificado.On success, receives the decoded value.
A marca a ser verificada antes da leitura ou null para a marca padrão (Universal 2).The tag to check for before reading, or null for the default tag (Universal 2).
Retornos
false e não avançará o leitor se o valor não estiver entre MinValue e MaxValue, inclusive; caso contrário, true será retornado e o leitor avançará.false and does not advance the reader if the value is not between MinValue and MaxValue, inclusive; otherwise true is returned and the reader advances.
Exceções
o valor a seguir não tem a marca correta.the next value does not have the correct tag. -ou- a codificação de comprimento não é válida de acordo com as regras de codificação atuais.-or- the length encoding is not valid under the current encoding rules. -ou- o conteúdo não é válido de acordo com as regras de codificação atuais.-or- the contents are not valid under the current encoding rules.
expectedTag.TagClassexpectedTag.TagClass é Universal, mas expectedTag.TagValueis Universal, but expectedTag.TagValue não está correto para o método.is not correct for the method.