private Dictionary <string, PropertyStoreItem> CreatePropertyStoreItems() { var dictionary = new Dictionary <string, PropertyStoreItem>(); var enumerable = _type.GetRuntimeProperties().Where(prop => prop.IsPublic() && !prop.GetIndexParameters().Any()); foreach (var item in enumerable) { var value = new PropertyStoreItem(item.PropertyType, CustomAttributeExtensions.GetCustomAttributes(item, inherit: true)); dictionary[item.Name] = value; } return(dictionary); }
internal bool TryGetPropertyStoreItem(string propertyName, out PropertyStoreItem item) { if (_propertyStoreItems == null) { lock (_syncRoot) { if (_propertyStoreItems == null) { _propertyStoreItems = CreatePropertyStoreItems(); } } } return(_propertyStoreItems.TryGetValue(propertyName, out item)); }