1 write to _newLineLength
System.Text.Json (1)
System\Text\Json\Writer\Utf8JsonWriter.cs (1)
255
_newLineLength
= options.NewLine.Length;
79 references to _newLineLength
System.Text.Json (79)
System\Text\Json\Writer\Utf8JsonWriter.cs (2)
1130
Debug.Assert(
_newLineLength
is 1 or 2, "Invalid new line length.");
1131
if (
_newLineLength
== 2)
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Bytes.cs (4)
284
Debug.Assert(escapedPropertyName.Length * JsonConstants.MaxExpansionFactorWhileTranscoding < int.MaxValue - indent - encodedLength - 7 -
_newLineLength
);
288
int maxRequired = indent + (escapedPropertyName.Length * JsonConstants.MaxExpansionFactorWhileTranscoding) + encodedLength + 7 +
_newLineLength
;
334
Debug.Assert(escapedPropertyName.Length < int.MaxValue - indent - encodedLength - 7 -
_newLineLength
);
338
int maxRequired = indent + escapedPropertyName.Length + encodedLength + 7 +
_newLineLength
;
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.DateTime.cs (4)
286
Debug.Assert(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - indent - JsonConstants.MaximumFormatDateTimeOffsetLength - 7 -
_newLineLength
);
290
int maxRequired = indent + (escapedPropertyName.Length * JsonConstants.MaxExpansionFactorWhileTranscoding) + JsonConstants.MaximumFormatDateTimeOffsetLength + 7 +
_newLineLength
;
335
Debug.Assert(escapedPropertyName.Length < int.MaxValue - indent - JsonConstants.MaximumFormatDateTimeOffsetLength - 7 -
_newLineLength
);
338
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)
285
Debug.Assert(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - indent - JsonConstants.MaximumFormatDateTimeOffsetLength - 7 -
_newLineLength
);
289
int maxRequired = indent + (escapedPropertyName.Length * JsonConstants.MaxExpansionFactorWhileTranscoding) + JsonConstants.MaximumFormatDateTimeOffsetLength + 7 +
_newLineLength
;
334
Debug.Assert(escapedPropertyName.Length < int.MaxValue - indent - JsonConstants.MaximumFormatDateTimeOffsetLength - 7 -
_newLineLength
);
337
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)
279
Debug.Assert(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - indent - JsonConstants.MaximumFormatDecimalLength - 5 -
_newLineLength
);
283
int maxRequired = indent + (escapedPropertyName.Length * JsonConstants.MaxExpansionFactorWhileTranscoding) + JsonConstants.MaximumFormatDecimalLength + 5 +
_newLineLength
;
325
Debug.Assert(escapedPropertyName.Length < int.MaxValue - indent - JsonConstants.MaximumFormatDecimalLength - 5 -
_newLineLength
);
328
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)
283
Debug.Assert(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - indent - JsonConstants.MaximumFormatDoubleLength - 5 -
_newLineLength
);
287
int maxRequired = indent + (escapedPropertyName.Length * JsonConstants.MaxExpansionFactorWhileTranscoding) + JsonConstants.MaximumFormatDoubleLength + 5 +
_newLineLength
;
329
Debug.Assert(escapedPropertyName.Length < int.MaxValue - indent - JsonConstants.MaximumFormatDoubleLength - 5 -
_newLineLength
);
332
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)
283
Debug.Assert(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - indent - JsonConstants.MaximumFormatSingleLength - 5 -
_newLineLength
);
287
int maxRequired = indent + (escapedPropertyName.Length * JsonConstants.MaxExpansionFactorWhileTranscoding) + JsonConstants.MaximumFormatSingleLength + 5 +
_newLineLength
;
329
Debug.Assert(escapedPropertyName.Length < int.MaxValue - indent - JsonConstants.MaximumFormatSingleLength - 5 -
_newLineLength
);
332
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)
287
Debug.Assert(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - indent - JsonConstants.MaximumFormatGuidLength - 7 -
_newLineLength
);
291
int maxRequired = indent + (escapedPropertyName.Length * JsonConstants.MaxExpansionFactorWhileTranscoding) + JsonConstants.MaximumFormatGuidLength + 7 +
_newLineLength
;
337
Debug.Assert(escapedPropertyName.Length < int.MaxValue - indent - JsonConstants.MaximumFormatGuidLength - 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.Helpers.cs (4)
108
Debug.Assert(escapedPropertyName.Length < int.MaxValue - indent - 6 -
_newLineLength
);
111
int maxRequired = minRequired + 1 +
_newLineLength
; // Optionally, 1 list separator and 1-2 bytes for new line
180
Debug.Assert(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - indent - 6 -
_newLineLength
);
184
int maxRequired = indent + (escapedPropertyName.Length * JsonConstants.MaxExpansionFactorWhileTranscoding) + 6 +
_newLineLength
;
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Literal.cs (4)
427
Debug.Assert(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - indent - value.Length - 5 -
_newLineLength
);
431
int maxRequired = indent + (escapedPropertyName.Length * JsonConstants.MaxExpansionFactorWhileTranscoding) + value.Length + 5 +
_newLineLength
;
473
Debug.Assert(escapedPropertyName.Length < int.MaxValue - indent - value.Length - 5 -
_newLineLength
);
476
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)
352
Debug.Assert(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - indent - JsonConstants.MaximumFormatInt64Length - 5 -
_newLineLength
);
356
int maxRequired = indent + (escapedPropertyName.Length * JsonConstants.MaxExpansionFactorWhileTranscoding) + JsonConstants.MaximumFormatInt64Length + 5 +
_newLineLength
;
398
Debug.Assert(escapedPropertyName.Length < int.MaxValue - indent - JsonConstants.MaximumFormatInt64Length - 5 -
_newLineLength
);
401
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)
190
Debug.Assert(escapedPropertyName.Length < (int.MaxValue - 5 - indent -
_newLineLength
) / JsonConstants.MaxExpansionFactorWhileTranscoding);
194
int maxRequired = indent + (escapedPropertyName.Length * JsonConstants.MaxExpansionFactorWhileTranscoding) + 5 +
_newLineLength
;
378
Debug.Assert(escapedPropertyName.Length < int.MaxValue - indent - 5 -
_newLineLength
);
381
int maxRequired = minRequired + 1 +
_newLineLength
; // Optionally, 1 list separator and 1-2 bytes for new line
1504
Debug.Assert(escapedPropertyName.Length < ((int.MaxValue - 7 - indent -
_newLineLength
) / JsonConstants.MaxExpansionFactorWhileTranscoding) - escapedValue.Length);
1508
int maxRequired = indent + ((escapedPropertyName.Length + escapedValue.Length) * JsonConstants.MaxExpansionFactorWhileTranscoding) + 7 +
_newLineLength
;
1554
Debug.Assert(escapedPropertyName.Length < int.MaxValue - indent - escapedValue.Length - 7 -
_newLineLength
);
1557
int maxRequired = minRequired + 1 +
_newLineLength
; // Optionally, 1 list separator and 1-2 bytes for new line
1605
Debug.Assert(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - escapedValue.Length - 7 - indent -
_newLineLength
);
1609
int maxRequired = indent + (escapedPropertyName.Length * JsonConstants.MaxExpansionFactorWhileTranscoding) + escapedValue.Length + 7 +
_newLineLength
;
1656
Debug.Assert(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - escapedValue.Length - 7 - indent -
_newLineLength
);
1660
int maxRequired = indent + (escapedValue.Length * JsonConstants.MaxExpansionFactorWhileTranscoding) + escapedPropertyName.Length + 7 +
_newLineLength
;
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.UnsignedNumber.cs (4)
361
Debug.Assert(escapedPropertyName.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - indent - JsonConstants.MaximumFormatUInt64Length - 5 -
_newLineLength
);
365
int maxRequired = indent + (escapedPropertyName.Length * JsonConstants.MaxExpansionFactorWhileTranscoding) + JsonConstants.MaximumFormatUInt64Length + 5 +
_newLineLength
;
407
Debug.Assert(escapedPropertyName.Length < int.MaxValue - indent - JsonConstants.MaximumFormatUInt64Length - 5 -
_newLineLength
);
410
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)
114
Debug.Assert(value.Length < (int.MaxValue / JsonConstants.MaxExpansionFactorWhileTranscoding) - indent - 4 -
_newLineLength
);
118
int maxRequired = indent + (value.Length * JsonConstants.MaxExpansionFactorWhileTranscoding) + 4 +
_newLineLength
;
221
Debug.Assert(utf8Value.Length < int.MaxValue - indent - 4 -
_newLineLength
);
224
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.StringSegment.cs (1)
479
int bytesRequired = 1 + indent + 1 +
_newLineLength
;
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