private bool ShouldMap(Type type) { if (includedTypes.Contains(type)) { return(true); // inclusions take precedence over everything } if (ignoredTypes.Contains(type)) { log.AutomappingSkippedType(type, "Skipped by IgnoreBase"); return(false); // excluded } if (type.IsGenericType && ignoredTypes.Contains(type.GetGenericTypeDefinition())) { log.AutomappingSkippedType(type, "Skipped by IgnoreBase"); return(false); // generic definition is excluded } if (type.IsAbstract && cfg.AbstractClassIsLayerSupertype(type)) { log.AutomappingSkippedType(type, "Skipped by IAutomappingConfiguration.AbstractClassIsLayerSupertype(Type)"); return(false); // is abstract and a layer supertype } if (cfg.IsComponent(type)) { log.AutomappingSkippedType(type, "Skipped by IAutomappingConfiguration.IsComponent(Type)"); return(false); // skipped because we don't want to map components as entities } if (type == typeof(object)) { return(false); // object! } return(true); }
public bool ShouldMap(Member member) { return(cfg.IsComponent(member.PropertyType)); }