public static MappingConfig LoadFromFileWithParents(string fileName) { try { MappingConfig obj = LoadFromFile(fileName); AssociateParents(obj.Group); MappingConfig.ValidateColumns(obj.TableName, obj.Column); obj.Group.ForEach(g => MappingConfig.ValidateGroup(g)); return(obj); } catch (Exception ex) { throw new Exception("Error loading config file: " + ex.Message, ex); } }
private static void ValidateGroup(MappingGroup group) { MappingConfig.ValidateColumns(group.TableName, group.Column); group.Group.ForEach(g => MappingConfig.ValidateGroup(g)); }