64 references to CborConformanceMode
System.Formats.Cbor (64)
System\Formats\Cbor\CborConformanceLevel.cs (48)
57
public static void Validate(
CborConformanceMode
conformanceMode)
59
if (conformanceMode <
CborConformanceMode
.Lax ||
60
conformanceMode >
CborConformanceMode
.Ctap2Canonical)
66
public static bool RequiresCanonicalIntegerRepresentation(
CborConformanceMode
conformanceMode)
70
case
CborConformanceMode
.Lax:
71
case
CborConformanceMode
.Strict:
74
case
CborConformanceMode
.Canonical:
75
case
CborConformanceMode
.Ctap2Canonical:
83
public static bool RequiresPreservingFloatPrecision(
CborConformanceMode
conformanceMode)
87
case
CborConformanceMode
.Lax:
88
case
CborConformanceMode
.Strict:
89
case
CborConformanceMode
.Canonical:
92
case
CborConformanceMode
.Ctap2Canonical:
100
public static bool RequiresUtf8Validation(
CborConformanceMode
conformanceMode)
104
case
CborConformanceMode
.Lax:
107
case
CborConformanceMode
.Strict:
108
case
CborConformanceMode
.Canonical:
109
case
CborConformanceMode
.Ctap2Canonical:
117
public static Encoding GetUtf8Encoding(
CborConformanceMode
conformanceMode)
119
return conformanceMode ==
CborConformanceMode
.Lax ? s_utf8EncodingLax : s_utf8EncodingStrict;
122
public static bool RequiresDefiniteLengthItems(
CborConformanceMode
conformanceMode)
126
case
CborConformanceMode
.Lax:
127
case
CborConformanceMode
.Strict:
130
case
CborConformanceMode
.Canonical:
131
case
CborConformanceMode
.Ctap2Canonical:
139
public static bool AllowsTags(
CborConformanceMode
conformanceMode)
143
case
CborConformanceMode
.Lax:
144
case
CborConformanceMode
.Strict:
145
case
CborConformanceMode
.Canonical:
148
case
CborConformanceMode
.Ctap2Canonical:
156
public static bool RequiresUniqueKeys(
CborConformanceMode
conformanceMode)
160
case
CborConformanceMode
.Lax:
163
case
CborConformanceMode
.Strict:
164
case
CborConformanceMode
.Canonical:
165
case
CborConformanceMode
.Ctap2Canonical:
173
public static bool RequiresSortedKeys(
CborConformanceMode
conformanceMode)
177
case
CborConformanceMode
.Strict:
178
case
CborConformanceMode
.Lax:
181
case
CborConformanceMode
.Canonical:
182
case
CborConformanceMode
.Ctap2Canonical:
190
public static bool RequireCanonicalSimpleValueEncodings(
CborConformanceMode
conformanceMode)
194
case
CborConformanceMode
.Lax:
197
case
CborConformanceMode
.Strict:
198
case
CborConformanceMode
.Canonical:
199
case
CborConformanceMode
.Ctap2Canonical:
232
public static int CompareKeyEncodings(ReadOnlySpan<byte> left, ReadOnlySpan<byte> right,
CborConformanceMode
mode)
238
case
CborConformanceMode
.Canonical:
249
case
CborConformanceMode
.Ctap2Canonical:
System\Formats\Cbor\Reader\CborReader.cs (5)
36
public
CborConformanceMode
ConformanceMode { get; }
53
/// Defaults to <see cref="
CborConformanceMode
.Strict" /> conformance mode.</param>
56
public CborReader(ReadOnlyMemory<byte> data,
CborConformanceMode
conformanceMode =
CborConformanceMode
.Strict, bool allowMultipleRootLevelValues = false)
67
/// <param name="disableConformanceModeChecks"><see langword="true" /> to disable conformance mode validation for the read value, equivalent to using <see cref="
CborConformanceMode
.Lax" />; otherwise, <see langword="false" />.</param>
System\Formats\Cbor\Reader\CborReader.SkipValue.cs (2)
11
/// <param name="disableConformanceModeChecks"><see langword="true" /> to disable conformance mode validation for the skipped values, equivalent to using <see cref="
CborConformanceMode
.Lax" />; otherwise, <see langword="false" />.</param>
24
/// <param name="disableConformanceModeChecks"><see langword="true" /> to disable conformance mode validation for the skipped values, equivalent to using <see cref="
CborConformanceMode
.Lax" />; otherwise, <see langword="false" />.</param>
System\Formats\Cbor\Writer\CborWriter.cs (9)
37
public
CborConformanceMode
ConformanceMode { get; }
61
/// Defaults to <see cref="
CborConformanceMode
.Strict" /> conformance mode.</param>
64
/// <exception cref="ArgumentOutOfRangeException"><paramref name="conformanceMode" /> is not a defined <see cref="
CborConformanceMode
" />.</exception>
66
public CborWriter(
CborConformanceMode
conformanceMode, bool convertIndefiniteLengthEncodings, bool allowMultipleRootLevelValues)
73
/// Defaults to <see cref="
CborConformanceMode
.Strict" /> conformance mode.</param>
78
/// <para><paramref name="conformanceMode" /> is not a defined <see cref="
CborConformanceMode
" />.</para>
83
CborConformanceMode
conformanceMode =
CborConformanceMode
.Strict,
153
static unsafe void ValidateEncoding(ReadOnlySpan<byte> encodedValue,
CborConformanceMode
conformanceMode)