private static AggregateTableMapping CreateMapping(Type type) { Type relateType = null; string extendParam = null; AggregateTableMapping aggregateMapping = null; IAggregateTableConfig config = ConfigManager.LoadAggregateTableConfig(type); if (config != null) { relateType = config.RelateType; extendParam = config.ExtendParams; } aggregateMapping = new AggregateTableMapping(type, relateType); aggregateMapping.ExtentParams = new ExtendParamsCollection(extendParam); return(aggregateMapping); }
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); }