CachedAttributeGetter<T>
using Newtonsoft.Json.Utilities;
using System;
using System.Runtime.CompilerServices;
namespace Newtonsoft.Json.Serialization
{
internal static class CachedAttributeGetter<T> where T : Attribute
{
[System.Runtime.CompilerServices.Nullable(new byte[] {
1,
1,
2
})]
private static readonly ThreadSafeStore<object, T> TypeAttributeCache = new ThreadSafeStore<object, T>(JsonTypeReflector.GetAttribute<T>);
[System.Runtime.CompilerServices.NullableContext(1)]
[return: System.Runtime.CompilerServices.Nullable(2)]
public static T GetAttribute(object type)
{
return TypeAttributeCache.Get(type);
}
}
}