private static List <IMappingConfig> FindParentMappingConfigs(ClassConfig classConfig, List <IMappingConfig> mappingConfigs) { var paarents = new List <IMappingConfig>(); foreach (var m in mappingConfigs) { if (m.Type != classConfig.Type && classConfig.Type.IsSubclassOf(m.Type)) { paarents.Add(m); } } return(paarents); }
private static List<IMappingConfig> FindParentMappingConfigs(ClassConfig classConfig, List<IMappingConfig> mappingConfigs) { var paarents = new List<IMappingConfig>(); foreach (var m in mappingConfigs) { if (m.Type != classConfig.Type && classConfig.Type.IsSubclassOf(m.Type)) { paarents.Add(m); } } return paarents; }
private static List <ClassConfig> SetupClassConfigs(List <IMappingConfig> mappingConfigs) { var classConfigs = new List <ClassConfig>(); foreach (var m in mappingConfigs) { var classConfig = new ClassConfig(m); var parents = FindParentMappingConfigs(classConfig, mappingConfigs); classConfig.Inherit(parents); classConfigs.Add(classConfig); } return(classConfigs); }
private static List<ClassConfig> SetupClassConfigs(List<IMappingConfig> mappingConfigs) { var classConfigs = new List<ClassConfig>(); foreach (var m in mappingConfigs) { var classConfig = new ClassConfig(m); var parents = FindParentMappingConfigs(classConfig, mappingConfigs); classConfig.Inherit(parents); classConfigs.Add(classConfig); } return classConfigs; }