61 references to MaxExpansionFactorWhileEscaping
System.Text.Json (61)
System\Text\Json\Document\JsonDocument.cs (1)
360
if (otherUtf8Text.Length < segment.Length / JsonConstants.
MaxExpansionFactorWhileEscaping
)
System\Text\Json\JsonConstants.cs (4)
79
public const int MaxUnescapedTokenSize = MaxEscapedTokenSize /
MaxExpansionFactorWhileEscaping
; // 166_666_666 bytes
80
public const int MaxCharacterTokenSize = MaxEscapedTokenSize /
MaxExpansionFactorWhileEscaping
; // 166_666_666 characters
90
public const int MaximumEscapedGuidLength =
MaxExpansionFactorWhileEscaping
* MaximumFormatGuidLength;
100
public const int MaximumEscapedDateTimeOffsetParseLength =
MaxExpansionFactorWhileEscaping
* MaximumDateTimeOffsetParseLength;
System\Text\Json\JsonHelpers.Escaping.cs (2)
33
Debug.Assert(int.MaxValue / JsonConstants.
MaxExpansionFactorWhileEscaping
>= utf8Value.Length);
61
Debug.Assert(int.MaxValue / JsonConstants.
MaxExpansionFactorWhileEscaping
>= utf8Value.Length);
System\Text\Json\Reader\JsonReaderHelper.Unescaping.cs (2)
96
Debug.Assert(utf8Source.Length >= other.Length && utf8Source.Length / JsonConstants.
MaxExpansionFactorWhileEscaping
<= other.Length);
124
Debug.Assert(utf8Source.Length >= other.Length && utf8Source.Length / JsonConstants.
MaxExpansionFactorWhileEscaping
<= other.Length);
System\Text\Json\Reader\Utf8JsonReader.cs (4)
615
if (localSpan.Length < other.Length || localSpan.Length / JsonConstants.
MaxExpansionFactorWhileEscaping
> other.Length)
641
if (sequenceLength < other.Length || sequenceLength / JsonConstants.
MaxExpansionFactorWhileEscaping
> other.Length)
719
|| sourceLength / (ValueIsEscaped ? JsonConstants.
MaxExpansionFactorWhileEscaping
: JsonConstants.MaxExpansionFactorWhileTranscoding) > charTextLength)
732
|| sourceLength / (ValueIsEscaped ? JsonConstants.
MaxExpansionFactorWhileEscaping
: JsonConstants.MaxExpansionFactorWhileTranscoding) > charTextLength)
System\Text\Json\Serialization\Converters\Value\CharConverter.cs (1)
11
private const int MaxEscapedCharacterLength = JsonConstants.
MaxExpansionFactorWhileEscaping
;
System\Text\Json\Serialization\Converters\Value\DateOnlyConverter.cs (1)
13
public const int MaxEscapedFormatLength = FormatLength * JsonConstants.
MaxExpansionFactorWhileEscaping
;
System\Text\Json\Serialization\Converters\Value\TimeOnlyConverter.cs (1)
15
private const int MaximumEscapedTimeOnlyFormatLength = JsonConstants.
MaxExpansionFactorWhileEscaping
* MaximumTimeOnlyFormatLength;
System\Text\Json\Serialization\Converters\Value\TimeSpanConverter.cs (1)
15
private const int MaximumEscapedTimeSpanFormatLength = JsonConstants.
MaxExpansionFactorWhileEscaping
* MaximumTimeSpanFormatLength;
System\Text\Json\Serialization\Converters\Value\VersionConverter.cs (1)
17
private const int MaximumEscapedVersionLength = JsonConstants.
MaxExpansionFactorWhileEscaping
* MaximumVersionLength;
System\Text\Json\Writer\JsonWriterHelper.Escaping.cs (1)
84
return firstIndexToEscape + JsonConstants.
MaxExpansionFactorWhileEscaping
* (textLength - firstIndexToEscape);
System\Text\Json\Writer\Utf8JsonWriter.cs (2)
814
Debug.Assert(int.MaxValue / JsonConstants.
MaxExpansionFactorWhileEscaping
>= utf8PropertyName.Length);
963
Debug.Assert(int.MaxValue / JsonConstants.
MaxExpansionFactorWhileEscaping
>= propertyName.Length);
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Bytes.cs (2)
136
Debug.Assert(int.MaxValue / JsonConstants.
MaxExpansionFactorWhileEscaping
>= propertyName.Length);
159
Debug.Assert(int.MaxValue / JsonConstants.
MaxExpansionFactorWhileEscaping
>= utf8PropertyName.Length);
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.DateTime.cs (2)
143
Debug.Assert(int.MaxValue / JsonConstants.
MaxExpansionFactorWhileEscaping
>= propertyName.Length);
166
Debug.Assert(int.MaxValue / JsonConstants.
MaxExpansionFactorWhileEscaping
>= utf8PropertyName.Length);
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.DateTimeOffset.cs (2)
142
Debug.Assert(int.MaxValue / JsonConstants.
MaxExpansionFactorWhileEscaping
>= propertyName.Length);
165
Debug.Assert(int.MaxValue / JsonConstants.
MaxExpansionFactorWhileEscaping
>= utf8PropertyName.Length);
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Decimal.cs (2)
142
Debug.Assert(int.MaxValue / JsonConstants.
MaxExpansionFactorWhileEscaping
>= propertyName.Length);
165
Debug.Assert(int.MaxValue / JsonConstants.
MaxExpansionFactorWhileEscaping
>= utf8PropertyName.Length);
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Double.cs (2)
146
Debug.Assert(int.MaxValue / JsonConstants.
MaxExpansionFactorWhileEscaping
>= propertyName.Length);
169
Debug.Assert(int.MaxValue / JsonConstants.
MaxExpansionFactorWhileEscaping
>= utf8PropertyName.Length);
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Float.cs (2)
146
Debug.Assert(int.MaxValue / JsonConstants.
MaxExpansionFactorWhileEscaping
>= propertyName.Length);
169
Debug.Assert(int.MaxValue / JsonConstants.
MaxExpansionFactorWhileEscaping
>= utf8PropertyName.Length);
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.FormattedNumber.cs (2)
116
Debug.Assert(int.MaxValue / JsonConstants.
MaxExpansionFactorWhileEscaping
>= propertyName.Length);
139
Debug.Assert(int.MaxValue / JsonConstants.
MaxExpansionFactorWhileEscaping
>= utf8PropertyName.Length);
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Guid.cs (2)
142
Debug.Assert(int.MaxValue / JsonConstants.
MaxExpansionFactorWhileEscaping
>= propertyName.Length);
165
Debug.Assert(int.MaxValue / JsonConstants.
MaxExpansionFactorWhileEscaping
>= utf8PropertyName.Length);
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Literal.cs (2)
261
Debug.Assert(int.MaxValue / JsonConstants.
MaxExpansionFactorWhileEscaping
>= propertyName.Length);
284
Debug.Assert(int.MaxValue / JsonConstants.
MaxExpansionFactorWhileEscaping
>= utf8PropertyName.Length);
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.SignedNumber.cs (2)
215
Debug.Assert(int.MaxValue / JsonConstants.
MaxExpansionFactorWhileEscaping
>= propertyName.Length);
238
Debug.Assert(int.MaxValue / JsonConstants.
MaxExpansionFactorWhileEscaping
>= utf8PropertyName.Length);
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.String.cs (14)
112
Debug.Assert(int.MaxValue / JsonConstants.
MaxExpansionFactorWhileEscaping
>= propertyName.Length);
271
Debug.Assert(int.MaxValue / JsonConstants.
MaxExpansionFactorWhileEscaping
>= utf8PropertyName.Length);
896
Debug.Assert(int.MaxValue / JsonConstants.
MaxExpansionFactorWhileEscaping
>= utf8Value.Length);
919
Debug.Assert(int.MaxValue / JsonConstants.
MaxExpansionFactorWhileEscaping
>= value.Length);
942
Debug.Assert(int.MaxValue / JsonConstants.
MaxExpansionFactorWhileEscaping
>= propertyName.Length);
965
Debug.Assert(int.MaxValue / JsonConstants.
MaxExpansionFactorWhileEscaping
>= utf8PropertyName.Length);
1064
Debug.Assert(int.MaxValue / JsonConstants.
MaxExpansionFactorWhileEscaping
>= value.Length);
1065
Debug.Assert(int.MaxValue / JsonConstants.
MaxExpansionFactorWhileEscaping
>= propertyName.Length);
1124
Debug.Assert(int.MaxValue / JsonConstants.
MaxExpansionFactorWhileEscaping
>= utf8Value.Length);
1125
Debug.Assert(int.MaxValue / JsonConstants.
MaxExpansionFactorWhileEscaping
>= utf8PropertyName.Length);
1184
Debug.Assert(int.MaxValue / JsonConstants.
MaxExpansionFactorWhileEscaping
>= utf8Value.Length);
1185
Debug.Assert(int.MaxValue / JsonConstants.
MaxExpansionFactorWhileEscaping
>= propertyName.Length);
1244
Debug.Assert(int.MaxValue / JsonConstants.
MaxExpansionFactorWhileEscaping
>= value.Length);
1245
Debug.Assert(int.MaxValue / JsonConstants.
MaxExpansionFactorWhileEscaping
>= utf8PropertyName.Length);
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.UnsignedNumber.cs (2)
224
Debug.Assert(int.MaxValue / JsonConstants.
MaxExpansionFactorWhileEscaping
>= propertyName.Length);
247
Debug.Assert(int.MaxValue / JsonConstants.
MaxExpansionFactorWhileEscaping
>= utf8PropertyName.Length);
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.String.cs (2)
185
Debug.Assert(int.MaxValue / JsonConstants.
MaxExpansionFactorWhileEscaping
>= value.Length);
332
Debug.Assert(int.MaxValue / JsonConstants.
MaxExpansionFactorWhileEscaping
>= utf8Value.Length);
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.StringSegment.cs (2)
135
Debug.Assert(int.MaxValue / JsonConstants.
MaxExpansionFactorWhileEscaping
>= value.Length);
304
Debug.Assert(int.MaxValue / JsonConstants.
MaxExpansionFactorWhileEscaping
>= utf8Value.Length);