50 references to StackallocCharThreshold
System.Text.Json (50)
src\libraries\System.Text.Json\Common\JsonSeparatorNamingPolicy.cs (2)
38Span<char> destination = initialBufferLength <= JsonConstants.StackallocCharThreshold 39? stackalloc char[JsonConstants.StackallocCharThreshold]
System\Text\Json\JsonHelpers.cs (2)
206Span<char> charBuffer = utf8Key.Length <= JsonConstants.StackallocCharThreshold ? 207stackalloc char[JsonConstants.StackallocCharThreshold] :
System\Text\Json\Nodes\JsonNode.cs (1)
145var path = new ValueStringBuilder(stackalloc char[JsonConstants.StackallocCharThreshold]);
System\Text\Json\Serialization\Converters\Value\EnumConverter.cs (3)
244Span<char> charBuffer = bufferLength <= JsonConstants.StackallocCharThreshold 245? stackalloc char[JsonConstants.StackallocCharThreshold] 405using ValueStringBuilder sb = new(stackalloc char[JsonConstants.StackallocCharThreshold]);
System\Text\Json\Writer\Utf8JsonWriter.cs (2)
970Span<char> escapedPropertyName = length <= JsonConstants.StackallocCharThreshold ? 971stackalloc char[JsonConstants.StackallocCharThreshold] :
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Bytes.cs (2)
143Span<char> escapedPropertyName = length <= JsonConstants.StackallocCharThreshold ? 144stackalloc char[JsonConstants.StackallocCharThreshold] :
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.DateTime.cs (2)
150Span<char> escapedPropertyName = length <= JsonConstants.StackallocCharThreshold ? 151stackalloc char[JsonConstants.StackallocCharThreshold] :
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.DateTimeOffset.cs (2)
149Span<char> escapedPropertyName = length <= JsonConstants.StackallocCharThreshold ? 150stackalloc char[JsonConstants.StackallocCharThreshold] :
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Decimal.cs (2)
149Span<char> escapedPropertyName = length <= JsonConstants.StackallocCharThreshold ? 150stackalloc char[JsonConstants.StackallocCharThreshold] :
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Double.cs (2)
153Span<char> escapedPropertyName = length <= JsonConstants.StackallocCharThreshold ? 154stackalloc char[JsonConstants.StackallocCharThreshold] :
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Float.cs (2)
153Span<char> escapedPropertyName = length <= JsonConstants.StackallocCharThreshold ? 154stackalloc char[JsonConstants.StackallocCharThreshold] :
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.FormattedNumber.cs (2)
123Span<char> escapedPropertyName = length <= JsonConstants.StackallocCharThreshold ? 124stackalloc char[JsonConstants.StackallocCharThreshold] :
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Guid.cs (2)
149Span<char> escapedPropertyName = length <= JsonConstants.StackallocCharThreshold ? 150stackalloc char[JsonConstants.StackallocCharThreshold] :
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.Literal.cs (2)
268Span<char> escapedPropertyName = length <= JsonConstants.StackallocCharThreshold ? 269stackalloc char[JsonConstants.StackallocCharThreshold] :
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.SignedNumber.cs (2)
222Span<char> escapedPropertyName = length <= JsonConstants.StackallocCharThreshold ? 223stackalloc char[JsonConstants.StackallocCharThreshold] :
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.String.cs (14)
121if (length > JsonConstants.StackallocCharThreshold) 128escapedPropertyName = stackalloc char[JsonConstants.StackallocCharThreshold]; 926Span<char> escapedValue = length <= JsonConstants.StackallocCharThreshold ? 927stackalloc char[JsonConstants.StackallocCharThreshold] : 949Span<char> escapedPropertyName = length <= JsonConstants.StackallocCharThreshold ? 950stackalloc char[JsonConstants.StackallocCharThreshold] : 1075if (length > JsonConstants.StackallocCharThreshold) 1082escapedValue = stackalloc char[JsonConstants.StackallocCharThreshold]; 1095if (length > JsonConstants.StackallocCharThreshold) 1102escapedPropertyName = stackalloc char[JsonConstants.StackallocCharThreshold]; 1215if (length > JsonConstants.StackallocCharThreshold) 1222escapedPropertyName = stackalloc char[JsonConstants.StackallocCharThreshold]; 1255if (length > JsonConstants.StackallocCharThreshold) 1262escapedValue = stackalloc char[JsonConstants.StackallocCharThreshold];
System\Text\Json\Writer\Utf8JsonWriter.WriteProperties.UnsignedNumber.cs (2)
231Span<char> escapedPropertyName = length <= JsonConstants.StackallocCharThreshold ? 232stackalloc char[JsonConstants.StackallocCharThreshold] :
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.String.cs (2)
192Span<char> escapedValue = length <= JsonConstants.StackallocCharThreshold ? 193stackalloc char[JsonConstants.StackallocCharThreshold] :
System\Text\Json\Writer\Utf8JsonWriter.WriteValues.StringSegment.cs (2)
142Span<char> escapedValue = length <= JsonConstants.StackallocCharThreshold ? 143stackalloc char[JsonConstants.StackallocCharThreshold] :