CborWriter Constructors 
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.
Overloads
| CborWriter(CborConformanceMode, Boolean, Boolean) | Initializes a new instance of CborWriter class using the specified configuration. | 
| CborWriter(CborConformanceMode, Boolean, Boolean, Int32) | Initializes a new instance of CborWriter class using the specified configuration. | 
CborWriter(CborConformanceMode, Boolean, Boolean)
- Source:
- CborWriter.cs
- Source:
- CborWriter.cs
- Source:
- CborWriter.cs
Initializes a new instance of CborWriter class using the specified configuration.
public:
 CborWriter(System::Formats::Cbor::CborConformanceMode conformanceMode, bool convertIndefiniteLengthEncodings, bool allowMultipleRootLevelValues);public CborWriter(System.Formats.Cbor.CborConformanceMode conformanceMode, bool convertIndefiniteLengthEncodings, bool allowMultipleRootLevelValues);new System.Formats.Cbor.CborWriter : System.Formats.Cbor.CborConformanceMode * bool * bool -> System.Formats.Cbor.CborWriterPublic Sub New (conformanceMode As CborConformanceMode, convertIndefiniteLengthEncodings As Boolean, allowMultipleRootLevelValues As Boolean)Parameters
- conformanceMode
- CborConformanceMode
One of the enumeration values that specifies the guidance on the conformance checks performed on the encoded data. Defaults to Strict conformance mode.
- convertIndefiniteLengthEncodings
- Boolean
true to enable automatically converting indefinite-length encodings into definite-length equivalents and allow use of indefinite-length write APIs in conformance modes that otherwise do not permit it; otherwise, false.
- allowMultipleRootLevelValues
- Boolean
true to allow multiple root-level values to be written by the writer; otherwise, false.
Exceptions
conformanceMode is not a defined CborConformanceMode.
Applies to
CborWriter(CborConformanceMode, Boolean, Boolean, Int32)
- Source:
- CborWriter.cs
- Source:
- CborWriter.cs
Initializes a new instance of CborWriter class using the specified configuration.
public CborWriter(System.Formats.Cbor.CborConformanceMode conformanceMode = System.Formats.Cbor.CborConformanceMode.Strict, bool convertIndefiniteLengthEncodings = false, bool allowMultipleRootLevelValues = false, int initialCapacity = -1);new System.Formats.Cbor.CborWriter : System.Formats.Cbor.CborConformanceMode * bool * bool * int -> System.Formats.Cbor.CborWriterPublic Sub New (Optional conformanceMode As CborConformanceMode = System.Formats.Cbor.CborConformanceMode.Strict, Optional convertIndefiniteLengthEncodings As Boolean = false, Optional allowMultipleRootLevelValues As Boolean = false, Optional initialCapacity As Integer = -1)Parameters
- conformanceMode
- CborConformanceMode
One of the enumeration values that specifies the guidance on the conformance checks performed on the encoded data. Defaults to Strict conformance mode.
- convertIndefiniteLengthEncodings
- Boolean
true to enable automatically converting indefinite-length encodings into definite-length equivalents and allow use of indefinite-length write APIs in conformance modes that otherwise do not permit it; otherwise, false.
- allowMultipleRootLevelValues
- Boolean
true to allow multiple root-level values to be written by the writer; otherwise, false.
- initialCapacity
- Int32
The initial capacity of the underlying buffer. The value -1 can be used to use the default capacity.
Exceptions
  conformanceMode is not a defined CborConformanceMode.
-or-
  initialCapacity is not zero, positive, or the default value indicator -1.