1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
| using System;
| using DPumpHydr.WinFrmUI.WenSkin.Json.Utilities;
|
| namespace DPumpHydr.WinFrmUI.WenSkin.Json.Serialization
| {
| internal static class CachedAttributeGetter<T> where T : Attribute
| {
| private static readonly ThreadSafeStore<object, T> TypeAttributeCache = new ThreadSafeStore<object, T>(JsonTypeReflector.GetAttribute<T>);
|
| public static T GetAttribute(object type)
| {
| return TypeAttributeCache.Get(type);
| }
| }
| }
|
|