1 write to Value
System.Text.Json (1)
System\Text\Json\Nodes\JsonValueOfT.cs (1)
20
Value
= value;
37 references to Value
System.Text.Json (37)
System\Text\Json\Nodes\JsonNode.To.cs (3)
49
return jsonString.
Value
;
52
if (this is JsonValueOfElement {
Value
.ValueKind: JsonValueKind.String } jsonElement)
54
return jsonElement.
Value
.GetString()!;
System\Text\Json\Nodes\JsonValueOfElement.cs (25)
19
internal override JsonElement? UnderlyingElement =>
Value
;
20
internal override JsonNode DeepCloneCore() => new JsonValueOfElement(
Value
.Clone(), Options);
21
private protected override JsonValueKind GetValueKindCore() =>
Value
.ValueKind;
27
return JsonElement.DeepEquals(
Value
, otherElement);
44
ThrowHelper.ThrowInvalidOperationException_NodeUnableToConvertElement(
Value
.ValueKind, typeof(TypeToConvert));
54
if (
Value
is TypeToConvert element)
60
switch (
Value
.ValueKind)
65
success =
Value
.TryGetInt32(out int result);
72
success =
Value
.TryGetInt64(out long result);
79
success =
Value
.TryGetDouble(out double result);
86
success =
Value
.TryGetInt16(out short result);
93
success =
Value
.TryGetDecimal(out decimal result);
100
success =
Value
.TryGetByte(out byte result);
107
success =
Value
.TryGetSingle(out float result);
114
success =
Value
.TryGetUInt32(out uint result);
121
success =
Value
.TryGetUInt16(out ushort result);
128
success =
Value
.TryGetUInt64(out ulong result);
135
success =
Value
.TryGetSByte(out sbyte result);
144
string? result =
Value
.GetString();
152
success =
Value
.TryGetDateTime(out DateTime result);
159
success =
Value
.TryGetDateTimeOffset(out DateTimeOffset result);
166
success =
Value
.TryGetGuid(out Guid result);
173
string? result =
Value
.GetString();
187
value = (TypeToConvert)(object)
Value
.GetBoolean();
204
Value
.WriteTo(writer);
System\Text\Json\Nodes\JsonValueOfT.cs (3)
26
if (
Value
is T returnValue)
41
if (
Value
is T returnValue)
141
public TValue? Value => _node.
Value
;
System\Text\Json\Nodes\JsonValueOfTCustomized.cs (2)
27
internal override JsonNode DeepCloneCore() => JsonSerializer.SerializeToNode(
Value
, _jsonTypeInfo)!;
44
jsonTypeInfo.Serialize(writer,
Value
);
System\Text\Json\Nodes\JsonValueOfTPrimitive.cs (4)
28
internal override JsonNode DeepCloneCore() => new JsonValuePrimitive<TValue>(
Value
, _converter, Options);
36
return EqualityComparer<TValue>.Default.Equals(
Value
, v);
54
converter.WriteNumberWithCustomHandling(writer,
Value
, options.NumberHandling);
58
converter.Write(writer,
Value
, options);