/*------------------------------------------------------------------------- * 功能描述:PropertyCache * 作者:xulisong * 创建时间: 2019/6/17 10:04:51 * 版本号:v1.0 * -------------------------------------------------------------------------*/ using System.Collections.Generic; using System.Reflection; namespace JBIM.Common { public static class PropertyCache { private static readonly Dictionary m_CacheProperties = new Dictionary(); /// /// 设置指定键值的属性 /// /// /// public static void SetProperty(string key, PropertyInfo propertyInfo) { m_CacheProperties[key] = propertyInfo; } /// /// 获取指定键值的属性 /// /// /// public static PropertyInfo GetProperty(string key) { m_CacheProperties.TryGetValue(key, out PropertyInfo result); return result; } } }