internal static IAggregateFieldConfig LoadAggregateFieldConfig(PropertyInfo pi) { IAggregateFieldConfig config = null; if (config == null) { LightDataConfig lightDataConfig = GetConfig(); if (lightDataConfig != null && lightDataConfig.ContainAggregateTableConfig(pi.ReflectedType)) { AggregateTableConfig atconfig = lightDataConfig.GetAggregateTableConfig(pi.ReflectedType); IConfiguratorFieldConfig fieldConfig = atconfig[pi.Name]; if (fieldConfig != null) { if (fieldConfig is IgnoraFieldConfig) { return(null); } config = atconfig[pi.Name] as AggregateFieldConfig; } } } if (config == null) { AggregateFieldAttribute[] attributes = AttributeCore.GetPropertyAttributes <AggregateFieldAttribute>(pi, true); if (attributes.Length > 0) { config = attributes[0]; } } return(config); }
internal static IAggregateTableConfig LoadAggregateTableConfig(Type type) { IAggregateTableConfig config = null; if (config == null) { LightDataConfig lightDataConfig = GetConfig(); if (lightDataConfig != null && lightDataConfig.ContainAggregateTableConfig(type)) { config = lightDataConfig.GetAggregateTableConfig(type); } } if (config == null) { AggregateTableAttribute[] attributes = AttributeCore.GetTypeAttributes <AggregateTableAttribute>(type, true); if (attributes.Length > 0) { config = attributes[0]; } } return(config); }