143 references to Captures
Microsoft.Build (12)
Evaluation\Expander.cs (9)
2016
if (expressionCapture.
Captures
?.Any(capture => string.Equals(capture.FunctionName, "Count", StringComparison.OrdinalIgnoreCase)) != true)
2019
if (expressionCapture.
Captures
?.Any(capture => string.Equals(capture.FunctionName, "AnyHaveMetadataValue", StringComparison.OrdinalIgnoreCase)) != true)
2027
if (expressionCapture.
Captures
!= null)
2136
ProjectErrorUtilities.VerifyThrowInvalidProject(match.
Captures
.Count > 0, elementLocation, "InvalidFunctionPropertyExpression");
2138
Stack<TransformFunction<S>> transformFunctionStack = new Stack<TransformFunction<S>>(match.
Captures
.Count);
2144
for (int n = match.
Captures
.Count - 1; n >= 0; n--)
2146
string function = match.
Captures
[n].Value;
2147
string functionName = match.
Captures
[n].FunctionName;
2148
string argumentsExpression = match.
Captures
[n].FunctionArguments;
Evaluation\LazyItemEvaluator.cs (2)
694
if (match.
Captures
!= null)
696
foreach (var subMatch in match.
Captures
)
Evaluation\LazyItemEvaluator.LazyItemOperation.cs (1)
339
if (itemExpressionFragment.Capture.
Captures
is object)
Microsoft.Build.Engine.UnitTests (131)
Evaluation\ExpressionShredder_Tests.cs (131)
581
Assert.Equal("%(Meta0)", capture.
Captures
[0].Value);
582
Assert.Equal("%(Filename)", capture.
Captures
[1].Value);
583
Assert.Equal("Substring($(Val))", capture.
Captures
[2].Value);
614
if (capture.
Captures
!= null)
618
Assert.Equal(transformGroup.Captures[i].Value, capture.
Captures
[i].Value);
657
Assert.Null(capture.
Captures
);
659
Assert.Null(capture.
Captures
);
673
Assert.Null(capture.
Captures
);
676
Assert.Null(capture.
Captures
);
690
Assert.Single(capture.
Captures
);
693
Assert.Single(capture.
Captures
);
694
Assert.Equal("%(Fullpath)", capture.
Captures
[0].Value);
708
Assert.Single(capture.
Captures
);
711
Assert.Single(capture.
Captures
);
712
Assert.Equal("%(Fullpath)", capture.
Captures
[0].Value);
726
Assert.Single(capture.
Captures
);
729
Assert.Single(capture.
Captures
);
730
Assert.Equal("Bar(a,b)", capture.
Captures
[0].Value);
731
Assert.Equal("Bar", capture.
Captures
[0].FunctionName);
732
Assert.Equal("a,b", capture.
Captures
[0].FunctionArguments);
746
Assert.Single(capture.
Captures
);
749
Assert.Single(capture.
Captures
);
750
Assert.Equal("Bar(a,b)", capture.
Captures
[0].Value);
751
Assert.Equal("Bar", capture.
Captures
[0].FunctionName);
752
Assert.Equal("a,b", capture.
Captures
[0].FunctionArguments);
766
Assert.Equal(2, capture.
Captures
.Count);
769
Assert.Equal("Metadata('Meta0')", capture.
Captures
[0].Value);
770
Assert.Equal("Metadata", capture.
Captures
[0].FunctionName);
771
Assert.Equal("'Meta0'", capture.
Captures
[0].FunctionArguments);
772
Assert.Equal("Directory()", capture.
Captures
[1].Value);
773
Assert.Equal("Directory", capture.
Captures
[1].FunctionName);
774
Assert.Null(capture.
Captures
[1].FunctionArguments);
788
Assert.Equal(2, capture.
Captures
.Count);
791
Assert.Equal("Metadata('Meta0')", capture.
Captures
[0].Value);
792
Assert.Equal("Metadata", capture.
Captures
[0].FunctionName);
793
Assert.Equal("'Meta0'", capture.
Captures
[0].FunctionArguments);
794
Assert.Equal("Directory()", capture.
Captures
[1].Value);
795
Assert.Equal("Directory", capture.
Captures
[1].FunctionName);
796
Assert.Null(capture.
Captures
[1].FunctionArguments);
810
Assert.Equal(2, capture.
Captures
.Count);
813
Assert.Equal("%(Fullpath)", capture.
Captures
[0].Value);
814
Assert.Null(capture.
Captures
[0].FunctionName);
815
Assert.Null(capture.
Captures
[0].FunctionArguments);
816
Assert.Equal("Directory()", capture.
Captures
[1].Value);
817
Assert.Equal("Directory", capture.
Captures
[1].FunctionName);
818
Assert.Null(capture.
Captures
[1].FunctionArguments);
832
Assert.Equal(2, capture.
Captures
.Count);
835
Assert.Equal("%(Fullpath)", capture.
Captures
[0].Value);
836
Assert.Null(capture.
Captures
[0].FunctionName);
837
Assert.Null(capture.
Captures
[0].FunctionArguments);
838
Assert.Equal("Directory()", capture.
Captures
[1].Value);
839
Assert.Equal("Directory", capture.
Captures
[1].FunctionName);
840
Assert.Null(capture.
Captures
[1].FunctionArguments);
854
Assert.Single(capture.
Captures
);
857
Assert.Equal("$(SOMEPROP)%(Fullpath)", capture.
Captures
[0].Value);
858
Assert.Null(capture.
Captures
[0].FunctionName);
859
Assert.Null(capture.
Captures
[0].FunctionArguments);
873
Assert.Equal(2, capture.
Captures
.Count);
876
Assert.Equal("%(Filename)", capture.
Captures
[0].Value);
877
Assert.Null(capture.
Captures
[0].FunctionName);
878
Assert.Null(capture.
Captures
[0].FunctionArguments);
879
Assert.Equal("Substring($(Val), $(Boo))", capture.
Captures
[1].Value);
880
Assert.Equal("Substring", capture.
Captures
[1].FunctionName);
881
Assert.Equal("$(Val), $(Boo)", capture.
Captures
[1].FunctionArguments);
895
Assert.Equal(2, capture.
Captures
.Count);
898
Assert.Equal("%(Filename)", capture.
Captures
[0].Value);
899
Assert.Null(capture.
Captures
[0].FunctionName);
900
Assert.Null(capture.
Captures
[0].FunctionArguments);
901
Assert.Equal("Substring(\"AA\", 'BB', `cc`)", capture.
Captures
[1].Value);
902
Assert.Equal("Substring", capture.
Captures
[1].FunctionName);
903
Assert.Equal("\"AA\", 'BB', `cc`", capture.
Captures
[1].FunctionArguments);
917
Assert.Equal(2, capture.
Captures
.Count);
920
Assert.Equal("%(Filename)", capture.
Captures
[0].Value);
921
Assert.Null(capture.
Captures
[0].FunctionName);
922
Assert.Null(capture.
Captures
[0].FunctionArguments);
923
Assert.Equal("Substring('()', $(Boo), ')(')", capture.
Captures
[1].Value);
924
Assert.Equal("Substring", capture.
Captures
[1].FunctionName);
925
Assert.Equal("'()', $(Boo), ')('", capture.
Captures
[1].FunctionArguments);
939
Assert.Equal(2, capture.
Captures
.Count);
942
Assert.Equal("%(Filename)", capture.
Captures
[0].Value);
943
Assert.Null(capture.
Captures
[0].FunctionName);
944
Assert.Null(capture.
Captures
[0].FunctionArguments);
945
Assert.Equal("Substring(`()`, $(Boo), \"AA\")", capture.
Captures
[1].Value);
946
Assert.Equal("Substring", capture.
Captures
[1].FunctionName);
947
Assert.Equal("`()`, $(Boo), \"AA\"", capture.
Captures
[1].FunctionArguments);
961
Assert.Equal(2, capture.
Captures
.Count);
964
Assert.Equal("%(Filename)", capture.
Captures
[0].Value);
965
Assert.Null(capture.
Captures
[0].FunctionName);
966
Assert.Null(capture.
Captures
[0].FunctionArguments);
967
Assert.Equal("Substring(`()`, $(Boo), \")(\")", capture.
Captures
[1].Value);
968
Assert.Equal("Substring", capture.
Captures
[1].FunctionName);
969
Assert.Equal("`()`, $(Boo), \")(\"", capture.
Captures
[1].FunctionArguments);
983
Assert.Equal(2, capture.
Captures
.Count);
986
Assert.Equal("%(Filename)", capture.
Captures
[0].Value);
987
Assert.Null(capture.
Captures
[0].FunctionName);
988
Assert.Null(capture.
Captures
[0].FunctionArguments);
989
Assert.Equal("Substring(\"()\", $(Boo), `)(`)", capture.
Captures
[1].Value);
990
Assert.Equal("Substring", capture.
Captures
[1].FunctionName);
991
Assert.Equal("\"()\", $(Boo), `)(`", capture.
Captures
[1].FunctionArguments);
1006
Assert.Null(expressions[0].
Captures
);
1007
Assert.Equal(2, capture.
Captures
.Count);
1010
Assert.Equal("%(Filename)", capture.
Captures
[0].Value);
1011
Assert.Null(capture.
Captures
[0].FunctionName);
1012
Assert.Null(capture.
Captures
[0].FunctionArguments);
1013
Assert.Equal("Substring(\"()\", $(Boo), `)(`)", capture.
Captures
[1].Value);
1014
Assert.Equal("Substring", capture.
Captures
[1].FunctionName);
1015
Assert.Equal("\"()\", $(Boo), `)(`", capture.
Captures
[1].FunctionArguments);
1030
Assert.Null(expressions[1].
Captures
);
1031
Assert.Equal(2, capture.
Captures
.Count);
1034
Assert.Equal("%(Filename)", capture.
Captures
[0].Value);
1035
Assert.Null(capture.
Captures
[0].FunctionName);
1036
Assert.Null(capture.
Captures
[0].FunctionArguments);
1037
Assert.Equal("Substring(\"()\", $(Boo), `)(`)", capture.
Captures
[1].Value);
1038
Assert.Equal("Substring", capture.
Captures
[1].FunctionName);
1039
Assert.Equal("\"()\", $(Boo), `)(`", capture.
Captures
[1].FunctionArguments);
1054
Assert.Null(expressions[1].
Captures
);
1055
Assert.Equal(2, capture.
Captures
.Count);
1058
Assert.Equal("%(Filename)", capture.
Captures
[0].Value);
1059
Assert.Null(capture.
Captures
[0].FunctionName);
1060
Assert.Null(capture.
Captures
[0].FunctionArguments);
1061
Assert.Equal("Substring(\"()\", $(Boo), `)(`)", capture.
Captures
[1].Value);
1062
Assert.Equal("Substring", capture.
Captures
[1].FunctionName);
1063
Assert.Equal("\"()\", $(Boo), `)(`", capture.
Captures
[1].FunctionArguments);
1078
Assert.Null(expressions[1].
Captures
);
1079
Assert.Equal(2, capture.
Captures
.Count);
1082
Assert.Equal("%(Filename)", capture.
Captures
[0].Value);
1083
Assert.Null(capture.
Captures
[0].FunctionName);
1084
Assert.Null(capture.
Captures
[0].FunctionArguments);
1085
Assert.Equal("Substring(\"()\", $(Boo), `)(\"`)", capture.
Captures
[1].Value);
1086
Assert.Equal("Substring", capture.
Captures
[1].FunctionName);
1087
Assert.Equal("\"()\", $(Boo), `)(\"`", capture.
Captures
[1].FunctionArguments);