CborWriterOptions.MaxDepth Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets the maximum depth allowed when writing CBOR data, with the default (-1) indicating a runtime-chosen maximum depth.
public:
property int MaxDepth { int get(); void set(int value); };
public int MaxDepth { get; set; }
member this.MaxDepth : int with get, set
Public Property MaxDepth As Integer
Property Value
The maximum depth allowed when writing CBOR data, or -1 to indicate a runtime-chosen maximum depth.
Exceptions
value is less than -1.
Remarks
The MaxDepth value is primarily to limit the amount of work the writer performs in validating data in methods such as WriteEncodedValue(ReadOnlySpan<Byte>).