示例#1
0
            protected override IMSBuildGlob CreateMsBuildGlob()
            {
                if (ReferencedItems.Count == 1)
                {
                    // Optimize the common case, avoiding allocation of enumerable/enumerator.
                    return(ReferencedItems[0].ItemAsValueFragment.ToMSBuildGlob());
                }

                return(CompositeGlob.Create(ReferencedItems.Select(i => i.ItemAsValueFragment.ToMSBuildGlob())));
            }
示例#2
0
 public override bool IsMatchOnMetadata(IItem item, IEnumerable <string> metadata, MatchOnMetadataOptions options)
 {
     return(ReferencedItems.Any(referencedItem =>
                                metadata.All(m => !item.GetMetadataValue(m).Equals(string.Empty) && MetadataComparer(options, item.GetMetadataValue(m), referencedItem.Item.GetMetadataValue(m)))));
 }
示例#3
0
 public override bool IsMatch(string itemToMatch)
 {
     return(ReferencedItems.Any(v => v.ItemAsValueFragment.IsMatch(itemToMatch)));
 }
示例#4
0
 public override int MatchCount(string itemToMatch)
 {
     return(ReferencedItems.Count(v => v.ItemAsValueFragment.MatchCount(itemToMatch) > 0));
 }
示例#5
0
 protected override IMSBuildGlob CreateMsBuildGlob()
 {
     return(new CompositeGlob(ReferencedItems.Select(i => i.ItemAsValueFragment.ToMSBuildGlob())));
 }
示例#6
0
 public override IEnumerable <string> GetReferencedItems()
 {
     return(ReferencedItems.Select(v => EscapingUtilities.UnescapeAll(v.ItemAsValueFragment.TextFragment)));
 }