17 references to PropertyRef
System.Text.Json (17)
System\Text\Json\Serialization\Metadata\JsonTypeInfo.Cache.cs (7)
71
private
PropertyRef
[] _utf8PropertyCache = [];
86
PropertyRef
[] utf8PropertyCache = _utf8PropertyCache; // Keep a local copy of the cache in case it changes by another thread.
87
ReadOnlySpan<
PropertyRef
> utf8PropertyCacheSpan = utf8PropertyCache;
88
ulong key =
PropertyRef
.GetKey(propertyName);
92
PropertyRef
propertyRef;
178
PropertyRef
[]? currentCache = _utf8PropertyCache;
183
PropertyRef
[] newCache = cacheBuilder.ToArray();
System\Text\Json\Serialization\Metadata\PropertyRef.cs (3)
15
internal readonly struct PropertyRef(ulong key, JsonPropertyInfo? info, byte[] utf8PropertyName) : IEquatable<
PropertyRef
>
37
public bool Equals(
PropertyRef
other) => Equals(other.Utf8PropertyName, other.Key);
38
public override bool Equals(object? obj) => obj is
PropertyRef
other && Equals(other);
System\Text\Json\Serialization\Metadata\PropertyRefCacheBuilder.cs (7)
10
/// Defines builder type for constructing updated <see cref="
PropertyRef
"/> caches.
12
internal sealed class PropertyRefCacheBuilder(
PropertyRef
[] originalCache)
15
private readonly List<
PropertyRef
> _propertyRefs = [];
16
private readonly HashSet<
PropertyRef
> _added = [];
21
public readonly
PropertyRef
[] OriginalCache = originalCache;
24
public
PropertyRef
[] ToArray() => [.. OriginalCache, .. _propertyRefs];
26
public void TryAdd(
PropertyRef
propertyRef)