1 write to _newLineLength
System.Text.Json (1)
System\Text\Json\Writer\Utf8JsonWriter.cs (1)
155
_newLineLength
= options.NewLine.Length;
78 references to _newLineLength
System.Text.Json (78)
System\Text\Json\Writer\Utf8JsonWriter.cs (2)
1030
Debug.Assert(
_newLineLength
is 1 or 2, "Invalid new line length.");
1031
if (
_newLineLength
== 2)
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Bytes.cs (4)
287
Debug.Assert(escapedPropertyName.Length * JsonConstants.MaxExpansionFactorWhileTranscoding < int.MaxValue - indent - encodedLength - 7 -
_newLineLength
);
291
int maxRequired = indent + (escapedPropertyName.Length * JsonConstants.MaxExpansionFactorWhileTranscoding) + encodedLength + 7 +
_newLineLength
;
337
Debug.Assert(escapedPropertyName.Length < int.MaxValue - indent - encodedLength - 7 -
_newLineLength
);
341
int maxRequired = indent + escapedPropertyName.Length + encodedLength + 7 +
_newLineLength
;
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.DateTime.cs (4)
289
Debug.Assert(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - indent - JsonConstants.MaximumFormatDateTimeOffsetLength - 7 -
_newLineLength
);
293
int maxRequired = indent + (escapedPropertyName.Length * JsonConstants.MaxExpansionFactorWhileTranscoding) + JsonConstants.MaximumFormatDateTimeOffsetLength + 7 +
_newLineLength
;
338
Debug.Assert(escapedPropertyName.Length < int.MaxValue - indent - JsonConstants.MaximumFormatDateTimeOffsetLength - 7 -
_newLineLength
);
341
int maxRequired = minRequired + 1 +
_newLineLength
; // Optionally, 1 list separator and 1-2 bytes for new line
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.DateTimeOffset.cs (4)
288
Debug.Assert(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - indent - JsonConstants.MaximumFormatDateTimeOffsetLength - 7 -
_newLineLength
);
292
int maxRequired = indent + (escapedPropertyName.Length * JsonConstants.MaxExpansionFactorWhileTranscoding) + JsonConstants.MaximumFormatDateTimeOffsetLength + 7 +
_newLineLength
;
337
Debug.Assert(escapedPropertyName.Length < int.MaxValue - indent - JsonConstants.MaximumFormatDateTimeOffsetLength - 7 -
_newLineLength
);
340
int maxRequired = minRequired + 1 +
_newLineLength
; // Optionally, 1 list separator and 1-2 bytes for new line
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Decimal.cs (4)
282
Debug.Assert(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - indent - JsonConstants.MaximumFormatDecimalLength - 5 -
_newLineLength
);
286
int maxRequired = indent + (escapedPropertyName.Length * JsonConstants.MaxExpansionFactorWhileTranscoding) + JsonConstants.MaximumFormatDecimalLength + 5 +
_newLineLength
;
328
Debug.Assert(escapedPropertyName.Length < int.MaxValue - indent - JsonConstants.MaximumFormatDecimalLength - 5 -
_newLineLength
);
331
int maxRequired = minRequired + 1 +
_newLineLength
; // Optionally, 1 list separator and 1-2 bytes for new line
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Double.cs (4)
286
Debug.Assert(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - indent - JsonConstants.MaximumFormatDoubleLength - 5 -
_newLineLength
);
290
int maxRequired = indent + (escapedPropertyName.Length * JsonConstants.MaxExpansionFactorWhileTranscoding) + JsonConstants.MaximumFormatDoubleLength + 5 +
_newLineLength
;
332
Debug.Assert(escapedPropertyName.Length < int.MaxValue - indent - JsonConstants.MaximumFormatDoubleLength - 5 -
_newLineLength
);
335
int maxRequired = minRequired + 1 +
_newLineLength
; // Optionally, 1 list separator and 1-2 bytes for new line
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Float.cs (4)
286
Debug.Assert(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - indent - JsonConstants.MaximumFormatSingleLength - 5 -
_newLineLength
);
290
int maxRequired = indent + (escapedPropertyName.Length * JsonConstants.MaxExpansionFactorWhileTranscoding) + JsonConstants.MaximumFormatSingleLength + 5 +
_newLineLength
;
332
Debug.Assert(escapedPropertyName.Length < int.MaxValue - indent - JsonConstants.MaximumFormatSingleLength - 5 -
_newLineLength
);
335
int maxRequired = minRequired + 1 +
_newLineLength
; // Optionally, 1 list separator and 1-2 bytes for new line
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Guid.cs (4)
290
Debug.Assert(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - indent - JsonConstants.MaximumFormatGuidLength - 7 -
_newLineLength
);
294
int maxRequired = indent + (escapedPropertyName.Length * JsonConstants.MaxExpansionFactorWhileTranscoding) + JsonConstants.MaximumFormatGuidLength + 7 +
_newLineLength
;
340
Debug.Assert(escapedPropertyName.Length < int.MaxValue - indent - JsonConstants.MaximumFormatGuidLength - 7 -
_newLineLength
);
343
int maxRequired = minRequired + 1 +
_newLineLength
; // Optionally, 1 list separator and 1-2 bytes for new line
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Helpers.cs (4)
94
Debug.Assert(escapedPropertyName.Length < int.MaxValue - indent - 6 -
_newLineLength
);
97
int maxRequired = minRequired + 1 +
_newLineLength
; // Optionally, 1 list separator and 1-2 bytes for new line
166
Debug.Assert(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - indent - 6 -
_newLineLength
);
170
int maxRequired = indent + (escapedPropertyName.Length * JsonConstants.MaxExpansionFactorWhileTranscoding) + 6 +
_newLineLength
;
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Literal.cs (4)
433
Debug.Assert(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - indent - value.Length - 5 -
_newLineLength
);
437
int maxRequired = indent + (escapedPropertyName.Length * JsonConstants.MaxExpansionFactorWhileTranscoding) + value.Length + 5 +
_newLineLength
;
479
Debug.Assert(escapedPropertyName.Length < int.MaxValue - indent - value.Length - 5 -
_newLineLength
);
482
int maxRequired = minRequired + 1 +
_newLineLength
; // Optionally, 1 list separator and 1-2 bytes for new line
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.SignedNumber.cs (4)
358
Debug.Assert(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - indent - JsonConstants.MaximumFormatInt64Length - 5 -
_newLineLength
);
362
int maxRequired = indent + (escapedPropertyName.Length * JsonConstants.MaxExpansionFactorWhileTranscoding) + JsonConstants.MaximumFormatInt64Length + 5 +
_newLineLength
;
404
Debug.Assert(escapedPropertyName.Length < int.MaxValue - indent - JsonConstants.MaximumFormatInt64Length - 5 -
_newLineLength
);
407
int maxRequired = minRequired + 1 +
_newLineLength
; // Optionally, 1 list separator and 1-2 bytes for new line
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.String.cs (12)
193
Debug.Assert(escapedPropertyName.Length < (int.MaxValue - 5 - indent -
_newLineLength
) / JsonConstants.MaxExpansionFactorWhileTranscoding);
197
int maxRequired = indent + (escapedPropertyName.Length * JsonConstants.MaxExpansionFactorWhileTranscoding) + 5 +
_newLineLength
;
381
Debug.Assert(escapedPropertyName.Length < int.MaxValue - indent - 5 -
_newLineLength
);
384
int maxRequired = minRequired + 1 +
_newLineLength
; // Optionally, 1 list separator and 1-2 bytes for new line
1519
Debug.Assert(escapedPropertyName.Length < ((int.MaxValue - 7 - indent -
_newLineLength
) / JsonConstants.MaxExpansionFactorWhileTranscoding) - escapedValue.Length);
1523
int maxRequired = indent + ((escapedPropertyName.Length + escapedValue.Length) * JsonConstants.MaxExpansionFactorWhileTranscoding) + 7 +
_newLineLength
;
1569
Debug.Assert(escapedPropertyName.Length < int.MaxValue - indent - escapedValue.Length - 7 -
_newLineLength
);
1572
int maxRequired = minRequired + 1 +
_newLineLength
; // Optionally, 1 list separator and 1-2 bytes for new line
1620
Debug.Assert(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - escapedValue.Length - 7 - indent -
_newLineLength
);
1624
int maxRequired = indent + (escapedPropertyName.Length * JsonConstants.MaxExpansionFactorWhileTranscoding) + escapedValue.Length + 7 +
_newLineLength
;
1671
Debug.Assert(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - escapedValue.Length - 7 - indent -
_newLineLength
);
1675
int maxRequired = indent + (escapedValue.Length * JsonConstants.MaxExpansionFactorWhileTranscoding) + escapedPropertyName.Length + 7 +
_newLineLength
;
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.UnsignedNumber.cs (4)
367
Debug.Assert(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - indent - JsonConstants.MaximumFormatUInt64Length - 5 -
_newLineLength
);
371
int maxRequired = indent + (escapedPropertyName.Length * JsonConstants.MaxExpansionFactorWhileTranscoding) + JsonConstants.MaximumFormatUInt64Length + 5 +
_newLineLength
;
413
Debug.Assert(escapedPropertyName.Length < int.MaxValue - indent - JsonConstants.MaximumFormatUInt64Length - 5 -
_newLineLength
);
416
int maxRequired = minRequired + 1 +
_newLineLength
; // Optionally, 1 list separator and 1-2 bytes for new line
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.Bytes.cs (1)
97
int extraSpaceRequired = indent + 3 +
_newLineLength
;
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.Comment.cs (4)
110
Debug.Assert(value.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - indent - 4 -
_newLineLength
);
114
int maxRequired = indent + (value.Length * JsonConstants.MaxExpansionFactorWhileTranscoding) + 4 +
_newLineLength
;
217
Debug.Assert(utf8Value.Length < int.MaxValue - indent - 4 -
_newLineLength
);
220
int maxRequired = minRequired +
_newLineLength
; // Optionally, 1-2 bytes for new line
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.DateTime.cs (1)
72
int maxRequired = indent + JsonConstants.MaximumFormatDateTimeOffsetLength + 3 +
_newLineLength
;
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.DateTimeOffset.cs (1)
73
int maxRequired = indent + JsonConstants.MaximumFormatDateTimeOffsetLength + 3 +
_newLineLength
;
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.Decimal.cs (1)
68
int maxRequired = indent + JsonConstants.MaximumFormatDecimalLength + 1 +
_newLineLength
; // Optionally, 1 list separator and 1-2 bytes for new line
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.Double.cs (1)
72
int maxRequired = indent + JsonConstants.MaximumFormatDoubleLength + 1 +
_newLineLength
; // Optionally, 1 list separator and 1-2 bytes for new line
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.Float.cs (1)
72
int maxRequired = indent + JsonConstants.MaximumFormatSingleLength + 1 +
_newLineLength
; // Optionally, 1 list separator and 1-2 bytes for new line
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.FormattedNumber.cs (2)
72
Debug.Assert(utf8Value.Length < int.MaxValue - indent - 1 -
_newLineLength
);
74
int maxRequired = indent + utf8Value.Length + 1 +
_newLineLength
; // Optionally, 1 list separator and 1-2 bytes for new line
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.Guid.cs (1)
73
int maxRequired = indent + JsonConstants.MaximumFormatGuidLength + 3 +
_newLineLength
;
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.Literal.cs (1)
92
int maxRequired = indent + utf8Value.Length + 1 +
_newLineLength
; // Optionally, 1 list separator and 1-2 bytes for new line
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.SignedNumber.cs (1)
81
int maxRequired = indent + JsonConstants.MaximumFormatInt64Length + 1 +
_newLineLength
; // Optionally, 1 list separator and 1-2 bytes for new line
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.String.cs (4)
148
Debug.Assert(escapedValue.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - indent - 3 -
_newLineLength
);
152
int maxRequired = indent + (escapedValue.Length * JsonConstants.MaxExpansionFactorWhileTranscoding) + 3 +
_newLineLength
;
295
Debug.Assert(escapedValue.Length < int.MaxValue - indent - 3 -
_newLineLength
);
298
int maxRequired = minRequired + 1 +
_newLineLength
; // Optionally, 1 list separator and 1-2 bytes for new line
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.UnsignedNumber.cs (1)
83
int maxRequired = indent + JsonConstants.MaximumFormatUInt64Length + 1 +
_newLineLength
; // Optionally, 1 list separator and 1-2 bytes for new line