Språk

CborReader.TrySkipValue(Boolean) Method

Definition

Attempts to read the contents of the next value, discarding the result and advancing the reader.

public bool TrySkipValue(bool disableConformanceModeChecks = false);
member this.TrySkipValue : bool -> bool
Public Function TrySkipValue (Optional disableConformanceModeChecks As Boolean = false) As Boolean

Parameters

disableConformanceModeChecks
Boolean

true to disable conformance mode validation for the skipped values, equivalent to using Lax; otherwise, false.

Returns

true if the value was skipped; false if the value is incomplete in the current buffer and the reader's current data is not the final block, in which case the reader state is unchanged.

Exceptions

The reader is not at the start of a new value.

The next value has an invalid CBOR encoding.

-or-

There was an unexpected end of CBOR encoding data and the reader's current data is the final block.

-or-

The next value uses a CBOR encoding that is not valid under the current conformance mode.

Applies to