190 references to ExpandProperties
Microsoft.Build (29)
Definition\Project.cs (2)
3469
string evaluatedExistingInclude = _data.Expander.ExpandIntoStringLeaveEscaped(candidateExistingItemXml.Include, ExpanderOptions.
ExpandProperties
, candidateExistingItemXml.IncludeLocation);
3523
string evaluatedValueEscaped = _data.Expander.ExpandIntoStringLeaveEscaped(unevaluatedValue, ExpanderOptions.
ExpandProperties
, propertyLocation);
Definition\Toolset.cs (1)
948
ExpanderOptions.
ExpandProperties
,
Definition\ToolsetReader.cs (1)
576
return expander.ExpandIntoStringAndUnescape(property.Value, ExpanderOptions.
ExpandProperties
, property.Source);
Evaluation\Evaluator.cs (16)
384
string evaluatedIncludeEscaped = expander.ExpandIntoStringLeaveEscaped(unevaluatedIncludeEscaped, ExpanderOptions.
ExpandProperties
, itemElement.IncludeLocation);
878
var initialTargets = _expander.ExpandIntoStringListLeaveEscaped(currentProjectOrImport.InitialTargets, ExpanderOptions.
ExpandProperties
, currentProjectOrImport.InitialTargetsLocation);
883
foreach (string propertyName in _expander.ExpandIntoStringListLeaveEscaped(currentProjectOrImport.TreatAsLocalProperty, ExpanderOptions.
ExpandProperties
, currentProjectOrImport.TreatAsLocalPropertyLocation))
964
string expanded = _expander.ExpandIntoStringLeaveEscaped(currentProjectOrImport.DefaultTargets, ExpanderOptions.
ExpandProperties
, currentProjectOrImport.DefaultTargetsLocation);
992
if (EvaluateConditionCollectingConditionedProperties(propertyGroupElement, ExpanderOptions.
ExpandProperties
, ParserOptions.AllowProperties))
1007
if (EvaluateCondition(itemDefinitionGroupElement, ExpanderOptions.
ExpandProperties
, ParserOptions.AllowProperties))
1310
if (!EvaluateConditionCollectingConditionedProperties(propertyElement, ExpanderOptions.
ExpandProperties
, ParserOptions.AllowProperties))
1321
string evaluatedValue = _expander.ExpandIntoStringLeaveEscaped(propertyElement.Value, ExpanderOptions.
ExpandProperties
, propertyElement.Location);
1433
if (EvaluateConditionCollectingConditionedProperties(importGroupElement, ExpanderOptions.
ExpandProperties
, ParserOptions.AllowProperties, _projectRootElementCache))
1457
if (EvaluateConditionCollectingConditionedProperties(whenElement, ExpanderOptions.
ExpandProperties
, ParserOptions.AllowProperties))
1607
if (!EvaluateConditionCollectingConditionedProperties(importElement, newExpandedCondition, ExpanderOptions.
ExpandProperties
, ParserOptions.AllowProperties,
1704
if (!EvaluateConditionCollectingConditionedProperties(importElement, ExpanderOptions.
ExpandProperties
,
1710
string expanded = _expander.ExpandIntoStringAndUnescape(importElement.Condition, ExpanderOptions.
ExpandProperties
| ExpanderOptions.LeavePropertiesUnexpandedOnError | ExpanderOptions.Truncate, importElement.ConditionLocation);
1780
const ExpanderOptions Options = ExpanderOptions.
ExpandProperties
;
2024
string importExpressionEscaped = _expander.ExpandIntoStringLeaveEscaped(unescapedExpression, ExpanderOptions.
ExpandProperties
, importElement.ProjectLocation);
2536
ExpanderOptions.
ExpandProperties
, importElement.ProjectLocation);
Evaluation\Expander.cs (5)
113
ExpandPropertiesAndItems =
ExpandProperties
| ExpandItems,
118
ExpandPropertiesAndMetadata = ExpandMetadata |
ExpandProperties
,
123
ExpandPropertiesAndCustomMetadata = ExpandCustomMetadata |
ExpandProperties
,
128
ExpandAll = ExpandMetadata |
ExpandProperties
| ExpandItems
1280
if (((options & ExpanderOptions.
ExpandProperties
) == 0) || String.IsNullOrEmpty(expression))
Evaluation\ItemSpec.cs (1)
189
ExpanderOptions.
ExpandProperties
,
Evaluation\LazyItemEvaluator.cs (3)
561
string evaluatedExclude = _expander.ExpandIntoStringLeaveEscaped(itemElement.Exclude, ExpanderOptions.
ExpandProperties
, itemElement.ExcludeLocation);
590
string evaluatedmatchOnMetadata = _expander.ExpandIntoStringLeaveEscaped(itemElement.MatchOnMetadata, ExpanderOptions.
ExpandProperties
, itemElement.MatchOnMetadataLocation);
637
const ExpanderOptions expanderOptions = ExpanderOptions.
ExpandProperties
| ExpanderOptions.LeavePropertiesUnexpandedOnError;
Microsoft.Build.Engine.UnitTests (161)
Evaluation\Evaluator_Tests.cs (2)
4496
ExpanderOptions.
ExpandProperties
,
4514
ExpanderOptions.
ExpandProperties
,
Evaluation\Expander_Tests.cs (159)
56
IList<TaskItem> itemsOut = expander.ExpandIntoTaskItemsLeaveEscaped("", ExpanderOptions.
ExpandProperties
, null);
67
IList<TaskItem> itemsOut = expander.ExpandIntoTaskItemsLeaveEscaped("foo", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
78
IList<TaskItem> itemsOut = expander.ExpandIntoTaskItemsLeaveEscaped("foo;bar", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
130
IList<TaskItem> itemsOut = expander.ExpandIntoTaskItemsLeaveEscaped("foo$(a);$(b);$(c)", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
155
IList<ProjectItemInstance> itemsOut = expander.ExpandIntoItemsLeaveEscaped("foo$(a);$(b);$(c);$(d", itemFactory, ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
171
string result = expander.ExpandIntoStringLeaveEscaped("$()", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
1712
Assert.Equal(@"@(Resource->'%(Filename)') ; @(Content) ; @(NonExistent) ; ; %(NonExistent) ; \jk ; l\mno%3bpqr\stu ; @(IntermediateAssembly->'%(RelativeDir)') ; %(Language)_%(Culture)", expander.ExpandIntoStringAndUnescape(value, ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance));
1775
string result = expander.ExpandIntoStringLeaveEscaped(@"$(HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\VSTSDB@VSTSDBDirectory)", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
1791
string result = expander.ExpandIntoStringLeaveEscaped(@"$(Solutions.VSVersion)", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
1809
expander.ExpandIntoStringLeaveEscaped(@"$(HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\VSTSDB@XXXXDBDirectory)", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
1826
expander.ExpandIntoStringLeaveEscaped(@"$(HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\VSTSDB@VSTSDBDirectoryX)", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
1842
string result = expander.ExpandIntoStringLeaveEscaped(@"$(Registry:HKEY_CURRENT_USER\Software\Microsoft\MSBuild_test@Value)", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
1867
string result = expander.ExpandIntoStringLeaveEscaped(@"$(Registry:HKEY_CURRENT_USER\Software\Microsoft\MSBuild_test@Value)", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
1889
string result = expander.ExpandIntoStringLeaveEscaped(@"$(Registry:HKEY_CURRENT_USER\Software\Microsoft\MSBuild_test@Value)", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
1912
string result = expander.ExpandIntoStringLeaveEscaped(@"$(Registry:HKEY_CURRENT_USER\Software\Microsoft\MSBuild_test@Value)", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
1934
string result = expander.ExpandIntoStringLeaveEscaped(@"$(Registry:HKEY_CURRENT_USER\Software\Microsoft\MSBuild_test@Value)", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
1956
string result = expander.ExpandIntoStringLeaveEscaped(@"$(Registry:HKEY_CURRENT_USER\Software\Microsoft\MSBuild_test@Value)", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
2049
string result = expander.ExpandIntoStringLeaveEscaped("$([System.Convert]::ChangeType('null',$(SomeStuff.GetTypeCode())))", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
2065
string result = expander.ExpandIntoStringLeaveEscaped("$([System.Environment]::GetEnvironmentVariable(`_NonExistentVar`))", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
2069
result = expander.ExpandIntoStringLeaveEscaped("prefix_$([System.Environment]::GetEnvironmentVariable(`_NonExistentVar`))", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
2084
string result = expander.ExpandIntoStringLeaveEscaped("$(SomeStuff.ToUpperInvariant())", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
2100
string result = expander.ExpandIntoStringLeaveEscaped("$(FileName.Trim())", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
2116
string result = expander.ExpandIntoStringLeaveEscaped("$(SomeStuff.Length)", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
2132
string result = expander.ExpandIntoStringLeaveEscaped("$(SomeStuff.get_Length())", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
2148
string result = expander.ExpandIntoStringLeaveEscaped("$(SomeStuff.ToLowerInvariant())_goop", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
2164
string result = expander.ExpandIntoStringLeaveEscaped("$(SomeStuff.SubString(13))", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
2180
string result = expander.ExpandIntoStringLeaveEscaped("$(SomeStuff.SubString(8))", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
2197
string result = expander.ExpandIntoStringLeaveEscaped("$(MyPath.SubString($(RootPath.Length)))", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
2214
string result = expander.ExpandIntoStringLeaveEscaped("$(SomeStuff.SubString(1$(Value)))", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
2231
string result = expander.ExpandIntoStringLeaveEscaped(@"$(PathRoot2.Endswith(" + Path.DirectorySeparatorChar + "))", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
2233
result = expander.ExpandIntoStringLeaveEscaped(@"$(PathRoot.Endswith(" + Path.DirectorySeparatorChar + "))", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
2249
string result = expander.ExpandIntoStringLeaveEscaped("$(SomeStuff.SubString(1$(Value)).ToLowerInvariant().SubString($(Value)))", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
2267
string result = expander.ExpandIntoStringLeaveEscaped("$(SomeStuff.ToUpperInvariant().ToLowerInvariant())", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
2283
string result = expander.ExpandIntoStringLeaveEscaped("$(SomeStuff.SubString($(Value.get_Length())))", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
2298
string result = expander.ExpandIntoStringLeaveEscaped("$([MSBuild]::__GetListTest())", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
2314
string result = expander.ExpandIntoStringLeaveEscaped("$(List.Split(-))", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
2331
string result = expander.ExpandIntoStringLeaveEscaped("$([System.Environment]::GetEnvironmentVariables())", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance).ToUpperInvariant();
2349
string result = expander.ExpandIntoStringLeaveEscaped("$(List.Split($(Splitter.ToCharArray())))", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
2371
ExpanderOptions.
ExpandProperties
,
2381
ExpanderOptions.
ExpandProperties
,
2402
expander.ExpandIntoStringLeaveEscaped("[$(SomeStuff($(Value)))]", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
2420
expander.ExpandIntoStringLeaveEscaped("[$(SomeStuff.Lgg)]", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
2437
expander.ExpandIntoStringLeaveEscaped("$(SomeStuff.ToUpperInvariant().Foo)", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
2454
expander.ExpandIntoStringLeaveEscaped("[$(SomeStuff($(System.DateTime.Now)))]", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
2471
expander.ExpandIntoStringLeaveEscaped("$(SomeStuff.ToLowerInvariant()_goop)", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
2487
expander.ExpandIntoStringLeaveEscaped("[$(SomeStuff.Substring(HELLO!))]", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
2503
expander.ExpandIntoStringLeaveEscaped("[$(SomeStuff.Substring(-10))]", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
2518
expander.ExpandIntoStringLeaveEscaped("$(([System.DateTime]::Now).ToString(\"MM.dd.yyyy\"))", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
2531
string result = expander.ExpandIntoStringLeaveEscaped("[%(LowerLetterList.Identity.ToUpper())]", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
2547
string result = expander.ExpandIntoStringLeaveEscaped("$(System)", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
2566
string result = expander.ExpandIntoStringLeaveEscaped(@"$([MSBuild]::MakeRelative($(ParentPath), `$(FilePath)`))", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
2583
string result = expander.ExpandIntoStringLeaveEscaped(@"$([System.IO.Path]::Combine($(Drive), `$(File)`))", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
2599
object result = expander.ExpandPropertiesLeaveTypedAndEscaped(@"$([System.Version]::new($(ver1)))", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
2623
string result = expander.ExpandIntoStringLeaveEscaped(@"$([System.Version]::new($(ver1)).CompareTo($([System.Version]::new($(ver2)))))", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
2644
string result = expander.ExpandIntoStringLeaveEscaped("$([System.Type]::GetType(`System.Type`))", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
2671
string result = expander.ExpandIntoStringLeaveEscaped("$([System.Diagnostics.Process]::GetCurrentProcess().Id)", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
2700
Assert.Throws<InvalidProjectFileException>(() => expander.ExpandIntoStringLeaveEscaped("$([Microsoft.FOO.FileIO.FileSystem]::CurrentDirectory)", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance));
2701
Assert.Throws<InvalidProjectFileException>(() => expander.ExpandIntoStringLeaveEscaped("$([Foo.Baz]::new())", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance));
2702
Assert.Throws<InvalidProjectFileException>(() => expander.ExpandIntoStringLeaveEscaped("$([Foo]::new())", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance));
2703
Assert.Throws<InvalidProjectFileException>(() => expander.ExpandIntoStringLeaveEscaped("$([Foo.]::new())", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance));
2704
Assert.Throws<InvalidProjectFileException>(() => expander.ExpandIntoStringLeaveEscaped("$([.Foo]::new())", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance));
2705
Assert.Throws<InvalidProjectFileException>(() => expander.ExpandIntoStringLeaveEscaped("$([.]::new())", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance));
2706
Assert.Throws<InvalidProjectFileException>(() => expander.ExpandIntoStringLeaveEscaped("$([]::new())", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance));
2728
string result = expander.ExpandIntoStringLeaveEscaped(@"$([System.IO.Path]::Combine(`" + s_rootPathPrefix + "`, `$(File)`))", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
2746
ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
2764
ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
2781
Path.Combine(s_rootPathPrefix, "foo baz") + @" `, `$(File)`))", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
2797
string result = expander.ExpandIntoStringLeaveEscaped("$([System.DateTime]::Parse(" + dateTime + ").ToString(\"yyyy/MM/dd HH:mm:ss\"))", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
2812
string result = expander.ExpandIntoStringLeaveEscaped("$([System.DateTime]::Parse(" + dateTime + ").ToString(\"MM.dd.yyyy\"))", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
2827
string result = expander.ExpandIntoStringLeaveEscaped("$([System.DateTime]::Now.ToString(\"MM.dd.yyyy\"))", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
2845
@"`, $([System.IO.Path]::Combine(`foo`,`file.txt`))))", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
2862
string result = expander.ExpandIntoStringLeaveEscaped(@"$([System.Text.RegularExpressions.Regex]::IsMatch(`-42`, `^-?\d+(\.\d{2})?$`, `RegexOptions.IgnoreCase,RegexOptions.Singleline`))", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
2867
result = expander.ExpandIntoStringLeaveEscaped(@"$([System.Text.RegularExpressions.Regex]::IsMatch(`-42`, `^-?\d+(\.\d{2})?$`, System.Text.RegularExpressions.RegexOptions.IgnoreCase|RegexOptions.Singleline))", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
2871
result = expander.ExpandIntoStringLeaveEscaped(@"$([System.Text.RegularExpressions.Regex]::IsMatch(`100 GBP`, `^-?\d+(\.\d{2})?$`))", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
2886
string result = expander.ExpandIntoStringLeaveEscaped(@"$([System.DateTime]::Parse(" + dateTime + ").ToString(`yyyy/MM/dd HH:mm:ss`))", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
2901
string result = expander.ExpandIntoStringLeaveEscaped(@"$([System.Environment]::GetFolderPath(SpecialFolder.System))", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
2938
var result = expander.ExpandIntoStringLeaveEscaped(propertyFunction, ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
2960
expander.ExpandIntoStringLeaveEscaped(propertyFunction, ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance).ShouldBe(expected);
2982
expander.ExpandIntoStringLeaveEscaped(propertyFunction, ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance).ShouldBe(expected);
2998
expander.ExpandIntoStringLeaveEscaped(propertyFunction, ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance).ShouldBe(expected);
3014
expander.ExpandIntoStringLeaveEscaped(propertyFunction, ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance).ShouldBe(expected);
3032
expander.ExpandIntoStringLeaveEscaped(propertyFunction, ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance).ShouldBe(expected);
3048
expander.ExpandIntoStringLeaveEscaped(propertyFunction, ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance).ShouldBe(expected);
3067
expander.ExpandIntoStringLeaveEscaped(propertyFunction, ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance).ShouldBe(expected);
3083
expander.ExpandIntoStringLeaveEscaped(propertyFunction, ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance).ShouldBe(expected);
3102
expander.ExpandIntoStringLeaveEscaped(propertyFunction, ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance).ShouldBe(expected);
3115
expander.ExpandIntoStringLeaveEscaped(propertyFunction, ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance).ShouldBe(expected);
3127
expander.ExpandIntoStringLeaveEscaped(propertyFunction, ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance).ShouldBe(expected);
3138
expander.ExpandIntoStringLeaveEscaped(propertyFunction, ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance).ShouldBe(expected);
3151
expander.ExpandIntoStringLeaveEscaped(propertyFunction, ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance).ShouldBe(expected);
3162
expander.ExpandIntoStringLeaveEscaped(propertyFunction, ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance).ShouldBe(expected);
3174
expander.ExpandIntoStringLeaveEscaped(propertyFunction, ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance).ShouldBe(expected);
3185
expander.ExpandIntoStringLeaveEscaped(propertyFunction, ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance).ShouldBe(expected);
3198
expander.ExpandIntoStringLeaveEscaped(propertyFunction, ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance).ShouldBe(expected);
3209
expander.ExpandIntoStringLeaveEscaped(propertyFunction, ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance).ShouldBe(expected);
3222
expander.ExpandIntoStringLeaveEscaped(propertyFunction, ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance).ShouldBe(expected);
3245
expander.ExpandIntoStringLeaveEscaped(propertyFunction, ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance).ShouldBe(expectedExpansion);
3265
expander.ExpandIntoStringLeaveEscaped(propertyFunction, ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance).ShouldBe(expectedExpansion);
3276
var result = expander.ExpandIntoStringLeaveEscaped($"$([MSBuild]::IsOsPlatform({osPlatformLowerCase}))", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
3413
ExpanderOptions.
ExpandProperties
,
3423
ExpanderOptions.
ExpandProperties
,
3439
string result = expander.ExpandIntoStringLeaveEscaped("$([System.String]::Equals(`a`, `A`, StringComparison.OrdinalIgnoreCase))", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
3462
string result = expander.ExpandIntoStringAndUnescape(@"$([MSBuild]::GetDirectoryNameOfFileAbove($(StartingDirectory), $(FileToFind)))", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
3466
result = expander.ExpandIntoStringAndUnescape(@"$([MSBuild]::GetDirectoryNameOfFileAbove($(StartingDirectory), Hobbits))", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
3496
string result = expander.ExpandIntoStringAndUnescape(@"$([MSBuild]::GetPathOfFileAbove($(FileToFind)))", ExpanderOptions.
ExpandProperties
, mockElementLocation);
3500
result = expander.ExpandIntoStringAndUnescape(@"$([MSBuild]::GetPathOfFileAbove('Hobbits'))", ExpanderOptions.
ExpandProperties
, mockElementLocation);
3539
expander.ExpandIntoStringLeaveEscaped(@"$([MSBuild]::GetPathOfFileAbove($(FileWithPath)))", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
3558
string result = expander.ExpandIntoStringLeaveEscaped(@"$([System.Globalization.CultureInfo]::new(`en-US`).ToString())", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
3574
string result = expander.ExpandIntoStringLeaveEscaped(@"$([MSBuild]::Add(40, 2))", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
3589
string result = expander.ExpandIntoStringLeaveEscaped(@"$([MSBuild]::Add(39.9, 2.1))", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
3604
string result = expander.ExpandIntoStringLeaveEscaped(@"$([MSBuild]::ValueOrDefault('', '42'))", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
3608
result = expander.ExpandIntoStringLeaveEscaped(@"$([MSBuild]::ValueOrDefault('42', '43'))", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
3625
string result = expander.ExpandIntoStringLeaveEscaped(@"$([MSBuild]::ValueOrDefault('$(DifferentTargetsPath)', '42'))", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
3631
result = expander.ExpandIntoStringLeaveEscaped(@"$([MSBuild]::ValueOrDefault('$(DifferentTargetsPath)', '43'))", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
3681
expander.ExpandIntoStringAndUnescape(@"$([MSBuild]::NormalizeDirectory($(MyPath)))", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance));
3685
expander.ExpandIntoStringAndUnescape(@"$([MSBuild]::NormalizeDirectory($(MyPath), $(MySecondPath)))", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance));
3700
expander.ExpandIntoStringLeaveEscaped(@"$([MSBuild]::DoesTaskHostExist('ASDF', 'CurrentArchitecture'))", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
3775
string result = expander.ExpandIntoStringLeaveEscaped(@"$([MSBuild]::BitwiseAnd(32,$([System.IO.File]::GetAttributes(" + tempFile + "))))", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
3797
string result = expander.ExpandIntoStringLeaveEscaped(@"$([MSBuild]::Add(39.9, 2.1))", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
3801
result = expander.ExpandIntoStringLeaveEscaped(@"$([MSBuild]::Add(40, 2))", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
3805
result = expander.ExpandIntoStringLeaveEscaped(@"$([MSBuild]::Subtract(44, 2))", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
3809
result = expander.ExpandIntoStringLeaveEscaped(@"$([MSBuild]::Subtract(42.9, 0.9))", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
3813
result = expander.ExpandIntoStringLeaveEscaped(@"$([MSBuild]::Multiply(21, 2))", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
3817
result = expander.ExpandIntoStringLeaveEscaped(@"$([MSBuild]::Multiply(84.0, 0.5))", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
3821
result = expander.ExpandIntoStringLeaveEscaped(@"$([MSBuild]::Divide(84, 2))", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
3825
result = expander.ExpandIntoStringLeaveEscaped(@"$([MSBuild]::Divide(84.4, 2.0))", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
3829
result = expander.ExpandIntoStringLeaveEscaped(@"$([MSBuild]::Modulo(85, 2))", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
3833
result = expander.ExpandIntoStringLeaveEscaped(@"$([MSBuild]::Modulo(2345.5, 43))", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
3848
expander.ExpandIntoStringLeaveEscaped(@"$([MSBuild]::BitwiseOr(40, 2))", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance).ShouldBe((40 | 2).ToString());
3849
expander.ExpandIntoStringLeaveEscaped(@"$([MSBuild]::BitwiseAnd(42, 2))", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance).ShouldBe((42 & 2).ToString());
3850
expander.ExpandIntoStringLeaveEscaped(@"$([MSBuild]::BitwiseXor(213, 255))", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance).ShouldBe((213 ^ 255).ToString());
3851
expander.ExpandIntoStringLeaveEscaped(@"$([MSBuild]::BitwiseNot(-43))", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance).ShouldBe((~-43).ToString());
3852
expander.ExpandIntoStringLeaveEscaped(@"$([MSBuild]::LeftShift(1, 2))", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance).ShouldBe((1 << 2).ToString());
3853
expander.ExpandIntoStringLeaveEscaped(@"$([MSBuild]::RightShift(-8, 2))", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance).ShouldBe((-8 >> 2).ToString());
3854
expander.ExpandIntoStringLeaveEscaped(@"$([MSBuild]::RightShiftUnsigned(-8, 2))", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance).ShouldBe((-8 >>> 2).ToString());
3868
string result = expander.ExpandIntoStringLeaveEscaped(@"$( SomeStuff )", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
3887
string result = expander.ExpandIntoStringLeaveEscaped(@"$([MSBuild]::GetRegistryValue('HKEY_CURRENT_USER\Software\Microsoft\MSBuild_test', '$(SomeProperty)'))", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
3911
string result = expander.ExpandIntoStringLeaveEscaped(@"$([MSBuild]::GetRegistryValue('HKEY_CURRENT_USER\Software\Microsoft\MSBuild_test', null))", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
3935
string result = expander.ExpandIntoStringLeaveEscaped(@"$([MSBuild]::GetRegistryValueFromView('HKEY_CURRENT_USER\Software\Microsoft\MSBuild_test', null, null, RegistryView.Default, RegistryView.Default))", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
3959
string result = expander.ExpandIntoStringLeaveEscaped(@"$([MSBuild]::GetRegistryValueFromView('HKEY_CURRENT_USER\Software\Microsoft\MSBuild_test', null, null, Microsoft.Win32.RegistryView.Default))", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
4039
expander.ExpandPropertiesLeaveTypedAndEscaped($"$([MSBuild]::StableStringHash('{toHash}'{hashTypeString}))", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance))
4079
object hashValue = expander.ExpandPropertiesLeaveTypedAndEscaped($"$([MSBuild]::StableStringHash('FooBar'{hashTypeString}))", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
4092
string intermediate = expander.ExpandPropertiesLeaveTypedAndEscaped($"$([MSBuild]::ConvertToBase64('{testCase}'))", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance) as string;
4094
string original = expander.ExpandPropertiesLeaveTypedAndEscaped($"$([MSBuild]::ConvertFromBase64('{intermediate}'))", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance) as string;
4106
string intermediate = expander.ExpandPropertiesLeaveTypedAndEscaped($"$([MSBuild]::ConvertToBase64('{plaintext}'))", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance) as string;
4118
string original = expander.ExpandPropertiesLeaveTypedAndEscaped($"$([MSBuild]::ConvertFromBase64('{base64}'))", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance) as string;
4365
result = expander.ExpandIntoStringLeaveEscaped(validTests[i][0], ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
4389
result = expander.ExpandIntoStringLeaveEscaped(errorTests[i], ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
4419
string result = expander.ExpandIntoStringLeaveEscaped($"$([MSBuild]::EnsureTrailingSlash('{path}'))", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
4424
result = expander.ExpandIntoStringLeaveEscaped("$([MSBuild]::EnsureTrailingSlash($(SomeProperty)))", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
4444
string result = expander.ExpandIntoStringLeaveEscaped(propertyFunction, ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
4490
string result = expander.ExpandIntoStringLeaveEscaped("$([System.Guid]::NewGuid())", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
4502
var result = expander.ExpandIntoStringLeaveEscaped($"$([MSBuild]::CheckFeatureAvailability({featureName}))", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
4514
var result = expander.ExpandIntoStringLeaveEscaped($"$([MSBuild]::SubstringByAsciiChars({featureName}, {start}, {length}))", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
4848
ExpanderOptions.
ExpandProperties
,
4860
string result = expander.ExpandIntoStringLeaveEscaped(expression, ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
5255
.ExpandIntoStringLeaveEscaped(methodInvocationMetadata, ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
5290
.ExpandIntoStringLeaveEscaped($"$([MSBuild]::RegisterBuildCheck({dummyAssemblyFile.Path}))", ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);
5363
return expander.ExpandIntoStringLeaveEscaped(expression, ExpanderOptions.
ExpandProperties
, MockElementLocation.Instance);