Beispiel #1
0
        private Item CompleteItem(Item item, [CanBeNull][ItemNotNull] string[] markers)
        {
            if (markers != null)
            {
                item.MergeWithMarkers(new MutableMarkerSet(item.Type.IgnoreCase,
                                                           AbstractMarkerSet.CreateMarkerSetWithClonedDictionary(item.Type.IgnoreCase, markers)));
            }
            Item result = ItemCache.GetReference(item).SetWorkingGraph(this);

            return(result);
        }
Beispiel #2
0
 private DependencyRuleGroup([CanBeNull] string defaultName, string groupPattern, DependencyMatch groupMatchOrNullForMainGroup,
                             [NotNull] IEnumerable <DependencyRule> allowed, [NotNull] IEnumerable <DependencyRule> questionable,
                             [NotNull] IEnumerable <DependencyRule> forbidden)
 {
     _groupPattern = string.IsNullOrWhiteSpace(groupPattern) ? "global" : groupPattern.Trim();
     _groupMatchOrNullForMainGroup = groupMatchOrNullForMainGroup;
     _groupMarker = groupMatchOrNullForMainGroup == null
         ? null
         : AbstractMarkerSet.CreateReadableDefaultMarker(
         new[] { groupMatchOrNullForMainGroup.UsingMatch },
         new[] { groupMatchOrNullForMainGroup.UsedMatch }, defaultName);
     _allowed      = allowed.ToList();
     _questionable = questionable.ToList();
     _forbidden    = forbidden.ToList();
 }