public override void Refine(ItemDefinition currentDefinition, IList<ItemDefinition> allDefinitions) { if (parentType.IsAssignableFrom(currentDefinition.ItemType)) { foreach (ItemDefinition definition in allDefinitions) { bool assignable = IsAssignable(definition.ItemType); if(assignable) currentDefinition.AddAllowedChild(definition); else if (option == IntegrityMappingOption.RemoveOthers) currentDefinition.RemoveAllowedChild(definition); } } }