Ejemplo n.º 1
0
        public bool IsMatch(MPRFeatureSet mprFeats)
        {
            foreach (MPRFeatureGroup group in Groups)
            {
                bool match = true;
                foreach (MPRFeature feat in group.Features)
                {
                    if (Contains(feat))
                    {
                        if (group.MatchType == MPRFeatureGroup.GroupMatchType.ALL)
                        {
                            if (!mprFeats.Contains(feat))
                            {
                                match = false;
                                break;
                            }
                        }
                        else
                        {
                            if (mprFeats.Contains(feat))
                            {
                                match = true;
                                break;
                            }
                            else
                            {
                                match = false;
                            }
                        }
                    }
                }

                if (!match)
                {
                    return(false);
                }
            }

            foreach (MPRFeature feat in this)
            {
                if (feat.Group == null && !mprFeats.Contains(feat))
                {
                    return(false);
                }
            }
            return(true);
        }
Ejemplo n.º 2
0
        public void AddOutput(MPRFeatureSet mprFeats)
        {
            foreach (MPRFeatureGroup group in mprFeats.Groups)
            {
                if (group.OutputType == MPRFeatureGroup.GroupOutputType.OVERWRITE)
                {
                    foreach (MPRFeature mprFeat in group.Features)
                    {
                        if (!mprFeats.Contains(mprFeat))
                        {
                            Remove(mprFeat);
                        }
                    }
                }
            }

            AddMany(mprFeats);
        }