Exemple #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())));
            }
Exemple #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)))));
 }
Exemple #3
0
 public override bool IsMatch(string itemToMatch)
 {
     return(ReferencedItems.Any(v => v.ItemAsValueFragment.IsMatch(itemToMatch)));
 }
Exemple #4
0
 public override int MatchCount(string itemToMatch)
 {
     return(ReferencedItems.Count(v => v.ItemAsValueFragment.MatchCount(itemToMatch) > 0));
 }
Exemple #5
0
 protected override IMSBuildGlob CreateMsBuildGlob()
 {
     return(new CompositeGlob(ReferencedItems.Select(i => i.ItemAsValueFragment.ToMSBuildGlob())));
 }
Exemple #6
0
 public override IEnumerable <string> GetReferencedItems()
 {
     return(ReferencedItems.Select(v => EscapingUtilities.UnescapeAll(v.ItemAsValueFragment.TextFragment)));
 }