Example #1
0
        public bool IsMatchExcluded(MprFeatureSet mprFeats, out MprFeatureGroup mismatchGroup)
        {
            foreach (IGrouping <MprFeatureGroup, MprFeature> group in this.GroupBy(mf => mf.Group))
            {
                if (group.Key == null || group.Key.MatchType == MprFeatureGroupMatchType.All)
                {
                    if (group.Any(mf => mprFeats.Contains(mf)))
                    {
                        mismatchGroup = group.Key;
                        return(false);
                    }
                }
                else
                {
                    if (group.All(mf => mprFeats.Contains(mf)))
                    {
                        mismatchGroup = group.Key;
                        return(false);
                    }
                }
            }

            mismatchGroup = null;
            return(true);
        }
Example #2
0
        public void AddOutput(MprFeatureSet mprFeats)
        {
            foreach (MprFeatureGroup group in mprFeats.Groups)
            {
                if (group.Output == MprFeatureGroupOutput.Overwrite)
                {
                    foreach (MprFeature mprFeat in group.MprFeatures)
                    {
                        if (!mprFeats.Contains(mprFeat))
                        {
                            Remove(mprFeat);
                        }
                    }
                }
            }

            UnionWith(mprFeats);
        }