Beispiel #1
0
        public override bool PreMatch(OutputChange outputChange, MappingType outputChangeMappingType, InputCondition inputCondition,
                                      MappingType inputConditionMappingType, List <EntityType> allEntityTypes)
        {
            // The EntityType being created need match with the ICMT's EntityType TypeGroup Target
            List <TypeGroup> typeGroups = inputConditionMappingType.EntityTypeGroupings();

            if (outputChange.entityType.InAllTypeGroups(typeGroups))
            {
                return(true);
            }
            return(false);
        }
Beispiel #2
0
        // Returns true if this and mappingType have any EntityTypes that match both
        public bool AnyEntityTypeMatchesTypeGroups(MappingType mappingType, List <EntityType> entityTypes)
        {
            List <TypeGroup> typeGroups = EntityTypeGroupings(true);

            if (typeGroups.Count == 0)
            {
                return(false);
            }

            List <TypeGroup> otherTypeGroups = mappingType.EntityTypeGroupings(true);

            if (otherTypeGroups.Count == 0)
            {
                return(false);
            }

            List <TypeGroup>  combinedTypeGroups = typeGroups.Union(otherTypeGroups).Distinct().ToList();
            List <EntityType> matches            = TypeGroup.InAllTypeGroups(combinedTypeGroups, entityTypes, true);

            return(matches != null && matches.Count > 0);
        }