61 references to MaxExpansionFactorWhileEscaping
System.Text.Json (61)
System\Text\Json\Document\JsonDocument.cs (1)
363
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)
79
return firstIndexToEscape + JsonConstants.
MaxExpansionFactorWhileEscaping
* (textLength - firstIndexToEscape);
System\Text\Json\Writer\Utf8JsonWriter.cs (2)
834
Debug.Assert(int.MaxValue / JsonConstants.
MaxExpansionFactorWhileEscaping
>= utf8PropertyName.Length);
989
Debug.Assert(int.MaxValue / JsonConstants.
MaxExpansionFactorWhileEscaping
>= propertyName.Length);
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Bytes.cs (2)
139
Debug.Assert(int.MaxValue / JsonConstants.
MaxExpansionFactorWhileEscaping
>= propertyName.Length);
162
Debug.Assert(int.MaxValue / JsonConstants.
MaxExpansionFactorWhileEscaping
>= utf8PropertyName.Length);
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.DateTime.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.DateTimeOffset.cs (2)
145
Debug.Assert(int.MaxValue / JsonConstants.
MaxExpansionFactorWhileEscaping
>= propertyName.Length);
168
Debug.Assert(int.MaxValue / JsonConstants.
MaxExpansionFactorWhileEscaping
>= utf8PropertyName.Length);
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Decimal.cs (2)
145
Debug.Assert(int.MaxValue / JsonConstants.
MaxExpansionFactorWhileEscaping
>= propertyName.Length);
168
Debug.Assert(int.MaxValue / JsonConstants.
MaxExpansionFactorWhileEscaping
>= utf8PropertyName.Length);
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Double.cs (2)
149
Debug.Assert(int.MaxValue / JsonConstants.
MaxExpansionFactorWhileEscaping
>= propertyName.Length);
172
Debug.Assert(int.MaxValue / JsonConstants.
MaxExpansionFactorWhileEscaping
>= utf8PropertyName.Length);
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Float.cs (2)
149
Debug.Assert(int.MaxValue / JsonConstants.
MaxExpansionFactorWhileEscaping
>= propertyName.Length);
172
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)
145
Debug.Assert(int.MaxValue / JsonConstants.
MaxExpansionFactorWhileEscaping
>= propertyName.Length);
168
Debug.Assert(int.MaxValue / JsonConstants.
MaxExpansionFactorWhileEscaping
>= utf8PropertyName.Length);
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Literal.cs (2)
267
Debug.Assert(int.MaxValue / JsonConstants.
MaxExpansionFactorWhileEscaping
>= propertyName.Length);
290
Debug.Assert(int.MaxValue / JsonConstants.
MaxExpansionFactorWhileEscaping
>= utf8PropertyName.Length);
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.SignedNumber.cs (2)
221
Debug.Assert(int.MaxValue / JsonConstants.
MaxExpansionFactorWhileEscaping
>= propertyName.Length);
244
Debug.Assert(int.MaxValue / JsonConstants.
MaxExpansionFactorWhileEscaping
>= utf8PropertyName.Length);
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.String.cs (14)
115
Debug.Assert(int.MaxValue / JsonConstants.
MaxExpansionFactorWhileEscaping
>= propertyName.Length);
274
Debug.Assert(int.MaxValue / JsonConstants.
MaxExpansionFactorWhileEscaping
>= utf8PropertyName.Length);
911
Debug.Assert(int.MaxValue / JsonConstants.
MaxExpansionFactorWhileEscaping
>= utf8Value.Length);
934
Debug.Assert(int.MaxValue / JsonConstants.
MaxExpansionFactorWhileEscaping
>= value.Length);
957
Debug.Assert(int.MaxValue / JsonConstants.
MaxExpansionFactorWhileEscaping
>= propertyName.Length);
980
Debug.Assert(int.MaxValue / JsonConstants.
MaxExpansionFactorWhileEscaping
>= utf8PropertyName.Length);
1079
Debug.Assert(int.MaxValue / JsonConstants.
MaxExpansionFactorWhileEscaping
>= value.Length);
1080
Debug.Assert(int.MaxValue / JsonConstants.
MaxExpansionFactorWhileEscaping
>= propertyName.Length);
1139
Debug.Assert(int.MaxValue / JsonConstants.
MaxExpansionFactorWhileEscaping
>= utf8Value.Length);
1140
Debug.Assert(int.MaxValue / JsonConstants.
MaxExpansionFactorWhileEscaping
>= utf8PropertyName.Length);
1199
Debug.Assert(int.MaxValue / JsonConstants.
MaxExpansionFactorWhileEscaping
>= utf8Value.Length);
1200
Debug.Assert(int.MaxValue / JsonConstants.
MaxExpansionFactorWhileEscaping
>= propertyName.Length);
1259
Debug.Assert(int.MaxValue / JsonConstants.
MaxExpansionFactorWhileEscaping
>= value.Length);
1260
Debug.Assert(int.MaxValue / JsonConstants.
MaxExpansionFactorWhileEscaping
>= utf8PropertyName.Length);
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.UnsignedNumber.cs (2)
230
Debug.Assert(int.MaxValue / JsonConstants.
MaxExpansionFactorWhileEscaping
>= propertyName.Length);
253
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)
146
Debug.Assert(int.MaxValue / JsonConstants.
MaxExpansionFactorWhileEscaping
>= value.Length);
323
Debug.Assert(int.MaxValue / JsonConstants.
MaxExpansionFactorWhileEscaping
>= utf8Value.Length);