Пример #1
0
        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);
        }
Пример #2
0
        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;
        }
Пример #3
0
        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);
        }
Пример #4
0
        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;

        }