System.Runtime.CompilerServices.ConditionalWeakTableExtensions
Polyfills the GetOrAdd APIs added to ConditionalWeakTable<T, U> in .NET 10.
See https://github.com/dotnet/runtime/pull/111204.
namespace System.Runtime.CompilerServices
{
internal static class ConditionalWeakTableExtensions
{
public static TValue GetOrAdd<TKey, [System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)] TValue>(this ConditionalWeakTable<TKey, TValue> table, TKey key, ConditionalWeakTable<TKey, TValue>.CreateValueCallback valueFactory) where TKey : class where TValue : class;
}
}