private void ApplyOverrides(Type classType, IList <Member> mappedMembers, ClassMappingBase mapping) { var autoMapType = ReflectionHelper.AutomappingTypeForEntityType(classType); var autoMap = Activator.CreateInstance(autoMapType, mappedMembers); inlineOverrides .Where(x => x.CanOverride(classType)) .Each(x => x.Apply(autoMap)); ((IAutoClasslike)autoMap).AlterModel(mapping); }
static bool IsAutomappingForType(object o, Type entityType) { var autoMappingType = ReflectionHelper.AutomappingTypeForEntityType(entityType); return(o.GetType().IsAssignableFrom(autoMappingType)); }