90 instantiations of MockElementLocation
Microsoft.Build.Engine.UnitTests (90)
BackEnd\SdkResolverLoader_Tests.cs (12)
47
var resolvers = loader.LoadAllResolvers(new
MockElementLocation
("file"));
78
var files = strategy.FindPotentialSdkResolvers(root, new
MockElementLocation
("file"));
110
var resolversFound = loader.FindPotentialSdkResolvers(root, new
MockElementLocation
("file"));
233
var resolversFound = loader.FindPotentialSdkResolvers(root, new
MockElementLocation
("file"));
259
var resolversManifestsFound = loader.FindPotentialSdkResolversManifests(root, new
MockElementLocation
("file"));
286
var ex = Should.Throw<InvalidProjectFileException>(() => loader.FindPotentialSdkResolvers(root, new
MockElementLocation
("file")));
302
var ex = Should.Throw<InvalidProjectFileException>(() => loader.FindPotentialSdkResolvers(root, new
MockElementLocation
("file")));
326
var ex = Should.Throw<InvalidProjectFileException>(() => loader.FindPotentialSdkResolvers(root, new
MockElementLocation
("file")));
348
IReadOnlyList<SdkResolverBase> resolvers = loader.LoadAllResolvers(new
MockElementLocation
("file"));
388
IReadOnlyList<string> resolvers = loader.FindPotentialSdkResolvers(testRoot, new
MockElementLocation
("file"));
479
var resolvers = loader.LoadAllResolvers(new
MockElementLocation
("file"));
491
loader.LoadAllResolvers(new
MockElementLocation
("file")));
BackEnd\SdkResolverService_Tests.cs (26)
53
var result = service.ResolveSdk(BuildEventContext.InvalidSubmissionId, sdk, _loggingContext, new
MockElementLocation
("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true);
88
var result = service.ResolveSdk(BuildEventContext.InvalidSubmissionId, sdk, _loggingContext, new
MockElementLocation
("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true);
123
var result = service.ResolveSdk(BuildEventContext.InvalidSubmissionId, sdk, _loggingContext, new
MockElementLocation
("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true);
140
SdkResolverException e = Should.Throw<SdkResolverException>(() => service.ResolveSdk(BuildEventContext.InvalidSubmissionId, sdk, _loggingContext, new
MockElementLocation
("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true));
155
var result = service.ResolveSdk(BuildEventContext.InvalidSubmissionId, sdk, _loggingContext, new
MockElementLocation
("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true);
173
new
MockElementLocation
("file"),
219
var result = service.ResolveSdk(BuildEventContext.InvalidSubmissionId, sdk, _loggingContext, new
MockElementLocation
("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true);
236
var result = service.ResolveSdk(BuildEventContext.InvalidSubmissionId, sdk, _loggingContext, new
MockElementLocation
("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true);
250
var result = service.ResolveSdk(BuildEventContext.InvalidSubmissionId, sdk, _loggingContext, new
MockElementLocation
("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true);
268
service.ResolveSdk(BuildEventContext.InvalidSubmissionId, sdk, _loggingContext, new
MockElementLocation
("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true);
284
var result = service.ResolveSdk(BuildEventContext.InvalidSubmissionId, sdk, _loggingContext, new
MockElementLocation
("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true);
308
service.ResolveSdk(submissionId, sdk, _loggingContext, new
MockElementLocation
("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true).Path.ShouldBe("resolverpath");
311
service.ResolveSdk(submissionId, sdk, _loggingContext, new
MockElementLocation
("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true).Path.ShouldBe(MockSdkResolverWithState.Expected);
325
service.ResolveSdk(submissionId, sdk, _loggingContext, new
MockElementLocation
("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true).Path.ShouldBe("resolverpath");
328
service.ResolveSdk(submissionId, sdk, _loggingContext, new
MockElementLocation
("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true).Path.ShouldBe("resolverpath");
342
service.ResolveSdk(submissionId, sdk, _loggingContext, new
MockElementLocation
("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true).Path.ShouldBe("defaultpath");
392
var result = service.ResolveSdk(BuildEventContext.InvalidSubmissionId, sdk, _loggingContext, new
MockElementLocation
("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true);
398
result = service.ResolveSdk(BuildEventContext.InvalidSubmissionId, new SdkReference("foo", "2.0.0", null), _loggingContext, new
MockElementLocation
("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true);
474
var result = service.ResolveSdk(BuildEventContext.InvalidSubmissionId, sdk, _loggingContext, new
MockElementLocation
("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true);
511
var result = service.ResolveSdk(BuildEventContext.InvalidSubmissionId, sdk, _loggingContext, new
MockElementLocation
("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true);
558
var result = service.ResolveSdk(BuildEventContext.InvalidSubmissionId, sdk, _loggingContext, new
MockElementLocation
("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true);
604
var result = service.ResolveSdk(BuildEventContext.InvalidSubmissionId, sdk, _loggingContext, new
MockElementLocation
("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true);
651
_ => service.ResolveSdk(BuildEventContext.InvalidSubmissionId, sdk, _loggingContext, new
MockElementLocation
("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true));
684
new
MockElementLocation
("file"),
715
new
MockElementLocation
("file"),
747
new
MockElementLocation
("file"),
Evaluation\Expander_Tests.cs (1)
3486
MockElementLocation mockElementLocation = new
MockElementLocation
(Path.Combine(ObjectModelHelpers.TempProjectDir, "one", "two", "three", "four", "five", Path.GetRandomFileName()));
Evaluation\ItemSpec_Tests.cs (2)
51
var itemSpecFromAbsolute = CreateItemSpecFrom(absoluteSpec, CreateExpander(new Dictionary<string, string[]>()), new
MockElementLocation
(projectFile));
52
var itemSpecFromRelative = CreateItemSpecFrom("s.cs", CreateExpander(new Dictionary<string, string[]>()), new
MockElementLocation
(projectFile));
Evaluation\UsedUninitializedProperties_Tests.cs (2)
25
IElementLocation location1 = new
MockElementLocation
("File1");
26
IElementLocation location2 = new
MockElementLocation
("File2");
Instance\ProjectTaskInstance_Internal_Tests.cs (3)
40
{"p1", ("v1", new
MockElementLocation
("p1")) }
52
{"p1", ("v1", new
MockElementLocation
("p1")) },
53
{"p2", ("v2", new
MockElementLocation
("p2")) }
MockElementLocation.cs (1)
18
private static MockElementLocation s_instance = new
MockElementLocation
();
TestData\ProjectInstanceTestObjects.cs (43)
23
new
MockElementLocation
($"location{stringCounter}"),
24
new
MockElementLocation
($"conditionLocation{stringCounter}"),
44
location: new
MockElementLocation
($"location{stringCounter}"),
45
includeLocation: new
MockElementLocation
($"include{stringCounter}"),
46
excludeLocation: new
MockElementLocation
($"remove{stringCounter}"),
47
removeLocation: new
MockElementLocation
($"exclude{stringCounter}"),
48
matchOnMetadataLocation: new
MockElementLocation
($"mm{stringCounter}"),
49
matchOnMetadataOptionsLocation: new
MockElementLocation
($"mmo{stringCounter}"),
50
keepMetadataLocation: new
MockElementLocation
($"km{stringCounter}"),
51
removeMetadataLocation: new
MockElementLocation
($"rm{stringCounter}"),
52
keepDuplicatesLocation: new
MockElementLocation
($"kd{stringCounter}"),
53
conditionLocation: new
MockElementLocation
($"cl{stringCounter}"),
65
new
MockElementLocation
($"location{stringCounter}"),
66
new
MockElementLocation
($"condition{stringCounter}"));
78
new
MockElementLocation
($"location{stringCounter}"),
79
new
MockElementLocation
($"conditionLocation{stringCounter}"),
91
new
MockElementLocation
($"location{stringCounter}"),
92
new
MockElementLocation
($"conditionLocation{stringCounter}"));
102
new
MockElementLocation
($"location{stringCounter}"),
103
new
MockElementLocation
($"executeTargetLocation{stringCounter}"),
104
new
MockElementLocation
($"conditionLocation{stringCounter}"));
128
new
MockElementLocation
($"location{stringCounter}"),
129
new
MockElementLocation
($"conditionLocation{stringCounter}"),
130
new
MockElementLocation
($"coeLocation{stringCounter}"),
131
new
MockElementLocation
($"msbrLocation{stringCounter}"),
132
new
MockElementLocation
($"msbaLocation{stringCounter}"));
143
new
MockElementLocation
($"location{stringCounter}"),
144
new
MockElementLocation
($"propertyLocation{stringCounter}"),
145
new
MockElementLocation
($"taskParamLocation{stringCounter}"),
146
new
MockElementLocation
($"conditionLocation{stringCounter}"));
157
new
MockElementLocation
($"location{stringCounter}"),
158
new
MockElementLocation
($"itemLocation{stringCounter}"),
159
new
MockElementLocation
($"taskParamLocation{stringCounter}"),
160
new
MockElementLocation
($"conditionLocation{stringCounter}"));
182
new
MockElementLocation
($"location{stringCounter}"),
183
new
MockElementLocation
($"conditionLocation{stringCounter}"),
184
new
MockElementLocation
($"inputsLocation{stringCounter}"),
185
new
MockElementLocation
($"outputsLocation{stringCounter}"),
186
new
MockElementLocation
($"returnsLocation{stringCounter}"),
187
new
MockElementLocation
($"kdoLocation{stringCounter}"),
188
new
MockElementLocation
($"dotLocation{stringCounter}"),
189
new
MockElementLocation
($"btLocation{stringCounter}"),
190
new
MockElementLocation
($"atLocation{stringCounter}"),
230 references to MockElementLocation
Microsoft.Build.Engine.UnitTests (230)
BackEnd\BatchingEngine_Tests.cs (13)
59
MockElementLocation
.Instance,
75
MockElementLocation
.Instance,
78
Assert.Equal("a.doc;b.doc;c.doc;d.doc;e.doc", bucket.Expander.ExpandIntoStringAndUnescape("@(doc)", ExpanderOptions.ExpandItems,
MockElementLocation
.Instance));
79
Assert.Equal("unittests.foo", bucket.Expander.ExpandIntoStringAndUnescape("$(bogus)$(UNITTESTS)", ExpanderOptions.ExpandPropertiesAndMetadata,
MockElementLocation
.Instance));
82
Assert.Equal("a.foo", buckets[0].Expander.ExpandIntoStringAndUnescape("@(File)", ExpanderOptions.ExpandItems,
MockElementLocation
.Instance));
83
Assert.Equal(".foo", buckets[0].Expander.ExpandIntoStringAndUnescape("@(File->'%(Extension)')", ExpanderOptions.ExpandItems,
MockElementLocation
.Instance));
84
Assert.Equal("obj\\a.ext", buckets[0].Expander.ExpandIntoStringAndUnescape("$(obj)\\%(Filename).ext", ExpanderOptions.ExpandPropertiesAndMetadata,
MockElementLocation
.Instance));
87
Assert.Equal(String.Empty, buckets[0].Expander.ExpandIntoStringAndUnescape("%(Extension)", ExpanderOptions.ExpandAll,
MockElementLocation
.Instance));
90
items = buckets[0].Expander.ExpandIntoItemsLeaveEscaped("@(file)", factory, ExpanderOptions.ExpandItems,
MockElementLocation
.Instance);
100
items = buckets[0].Expander.ExpandSingleItemVectorExpressionIntoItems("@(file)$(unitests)", factory, ExpanderOptions.ExpandItems, false /* no nulls */, out throwAway,
MockElementLocation
.Instance);
110
items = buckets[0].Expander.ExpandIntoItemsLeaveEscaped("@(file, ',')", factory, ExpanderOptions.ExpandItems,
MockElementLocation
.Instance);
186
MockElementLocation
.Instance,
211
MockElementLocation
.Instance,
Evaluation\Evaluator_Tests.cs (2)
4498
MockElementLocation
.Instance,
4516
MockElementLocation
.Instance,
Evaluation\Expander_Tests.cs (201)
68
IList<TaskItem> itemsOut = expander.ExpandIntoTaskItemsLeaveEscaped("foo", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
79
IList<TaskItem> itemsOut = expander.ExpandIntoTaskItemsLeaveEscaped("foo;bar", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
110
IList<TaskItem> itemsOut = expander.ExpandIntoTaskItemsLeaveEscaped("foo;bar;@(compile);@(resource)", ExpanderOptions.ExpandPropertiesAndItems,
MockElementLocation
.Instance);
131
IList<TaskItem> itemsOut = expander.ExpandIntoTaskItemsLeaveEscaped("foo$(a);$(b);$(c)", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
156
IList<ProjectItemInstance> itemsOut = expander.ExpandIntoItemsLeaveEscaped("foo$(a);$(b);$(c);$(d", itemFactory, ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
172
string result = expander.ExpandIntoStringLeaveEscaped("$()", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
187
IList<ProjectItemInstance> items = expander.ExpandIntoItemsLeaveEscaped("@(i)", itemFactory, ExpanderOptions.ExpandItems,
MockElementLocation
.Instance);
207
IList<ProjectItemInstance> items = expander.ExpandIntoItemsLeaveEscaped("@(i)", itemFactory, ExpanderOptions.ExpandItems,
MockElementLocation
.Instance);
227
IList<ProjectItemInstance> itemsTrue = expander.ExpandIntoItemsLeaveEscaped("@(i->AnyHaveMetadataValue('Even', 'true'))", itemFactory, ExpanderOptions.ExpandItems,
MockElementLocation
.Instance);
233
IList<ProjectItemInstance> itemsFalse = expander.ExpandIntoItemsLeaveEscaped("@(i->AnyHaveMetadataValue('Even', 'goop'))", itemFactory, ExpanderOptions.ExpandItems,
MockElementLocation
.Instance);
247
IList<ProjectItemInstance> itemsEmpty = expander.ExpandIntoItemsLeaveEscaped("@(unsetItem->AnyHaveMetadataValue('Metadatum', 'value'))", itemFactory, ExpanderOptions.ExpandItems,
MockElementLocation
.Instance);
265
IList<ProjectItemInstance> itemsTrue = expander.ExpandIntoItemsLeaveEscaped("@(i->Metadata('Meta0')->DirectoryName()->Distinct())", itemFactory, ExpanderOptions.ExpandItems,
MockElementLocation
.Instance);
271
IList<ProjectItemInstance> itemsDir = expander.ExpandIntoItemsLeaveEscaped("@(i->Metadata('Meta9')->DirectoryName()->Distinct())", itemFactory, ExpanderOptions.ExpandItems,
MockElementLocation
.Instance);
291
IList<ProjectItemInstance> itemsTrue = expander.ExpandIntoItemsLeaveEscaped("@(i->Metadata('Meta0')->Directory())", itemFactory, ExpanderOptions.ExpandItems,
MockElementLocation
.Instance);
297
itemsTrue = expander.ExpandIntoItemsLeaveEscaped("@(i->Metadata('Meta0')->Filename())", itemFactory, ExpanderOptions.ExpandItems,
MockElementLocation
.Instance);
303
itemsTrue = expander.ExpandIntoItemsLeaveEscaped("@(i->Metadata('Meta0')->Extension())", itemFactory, ExpanderOptions.ExpandItems,
MockElementLocation
.Instance);
319
string result = expander.ExpandIntoStringLeaveEscaped("[@(type->'%($(a)), '%'')]", ExpanderOptions.ExpandAll,
MockElementLocation
.Instance);
333
string result = expander.ExpandIntoStringLeaveEscaped("[@(i->'%(Meta9))']", ExpanderOptions.ExpandAll,
MockElementLocation
.Instance);
349
string result = expander.ExpandIntoStringLeaveEscaped("@(i->'%(Meta0)'->'%(Directory)'->Distinct())", ExpanderOptions.ExpandItems,
MockElementLocation
.Instance);
365
string result = expander.ExpandIntoStringLeaveEscaped("[@(i->'%(Meta0)'->'%(Directory)'->Distinct())]", ExpanderOptions.ExpandItems,
MockElementLocation
.Instance);
379
string result = expander.ExpandIntoStringLeaveEscaped("@(i->'%(MetaBlank)'->'%(Directory)'->Distinct())", ExpanderOptions.ExpandItems,
MockElementLocation
.Instance);
702
IList<ProjectItemInstance> itemsTrue = expander.ExpandIntoItemsLeaveEscaped("@(i->'%(Meta0)'->'%(Directory)')", itemFactory, ExpanderOptions.ExpandItems,
MockElementLocation
.Instance);
708
itemsTrue = expander.ExpandIntoItemsLeaveEscaped("@(i->'%(Meta0)'->'%(Filename)')", itemFactory, ExpanderOptions.ExpandItems,
MockElementLocation
.Instance);
714
itemsTrue = expander.ExpandIntoItemsLeaveEscaped("@(i->'%(Meta0)'->'%(Extension)'->Distinct())", itemFactory, ExpanderOptions.ExpandItems,
MockElementLocation
.Instance);
720
itemsTrue = expander.ExpandIntoItemsLeaveEscaped("@(i->'%(Meta0)'->'%(Filename)'->Substring($(Val)))", itemFactory, ExpanderOptions.ExpandItems,
MockElementLocation
.Instance);
740
IList<ProjectItemInstance> itemsTrue = expander.ExpandIntoItemsLeaveEscaped("@(i->Metadata('Meta0')->DirectoryName())", itemFactory, ExpanderOptions.ExpandItems,
MockElementLocation
.Instance);
760
IList<ProjectItemInstance> items = expander.ExpandIntoItemsLeaveEscaped("@(i->Metadata('Meta10')->DirectoryName())", itemFactory, ExpanderOptions.ExpandItems,
MockElementLocation
.Instance);
780
IList<ProjectItemInstance> items = expander.ExpandIntoItemsLeaveEscaped("@(i->ClearMetadata())", itemFactory, ExpanderOptions.ExpandItems,
MockElementLocation
.Instance);
1471
ExpanderOptions.ExpandAll,
MockElementLocation
.Instance);
1503
expander.ExpandIntoStringAndUnescape(stringToExpand, ExpanderOptions.ExpandAll,
MockElementLocation
.Instance));
1508
expander.ExpandIntoStringAndUnescape(stringToExpand, ExpanderOptions.ExpandAll,
MockElementLocation
.Instance));
1513
expander.ExpandIntoStringAndUnescape(stringToExpand, ExpanderOptions.ExpandAll,
MockElementLocation
.Instance));
1518
expander.ExpandIntoStringAndUnescape(stringToExpand, ExpanderOptions.ExpandAll,
MockElementLocation
.Instance));
1523
expander.ExpandIntoStringAndUnescape(stringToExpand, ExpanderOptions.ExpandAll,
MockElementLocation
.Instance));
1528
expander.ExpandIntoStringAndUnescape(stringToExpand, ExpanderOptions.ExpandAll,
MockElementLocation
.Instance));
1533
expander.ExpandIntoStringAndUnescape(stringToExpand, ExpanderOptions.ExpandAll,
MockElementLocation
.Instance));
1538
expander.ExpandIntoStringAndUnescape(stringToExpand, ExpanderOptions.ExpandAll,
MockElementLocation
.Instance));
1558
expander.ExpandIntoStringAndUnescape(xmlattribute.Value, ExpanderOptions.ExpandAll,
MockElementLocation
.Instance));
1564
expander.ExpandIntoStringAndUnescape(xmlattribute.Value, ExpanderOptions.ExpandAll,
MockElementLocation
.Instance));
1586
expander.ExpandIntoStringAndUnescape(xmlattribute.Value, ExpanderOptions.ExpandAll,
MockElementLocation
.Instance));
1607
expander.ExpandIntoStringLeaveEscaped(xmlattribute.Value, ExpanderOptions.ExpandAll,
MockElementLocation
.Instance));
1666
Assert.Equal(expected, expander.ExpandIntoStringAndUnescape(xmlattribute.Value, ExpanderOptions.ExpandAll | ExpanderOptions.Truncate,
MockElementLocation
.Instance));
1689
string expandedString = expander.ExpandIntoStringLeaveEscaped(xmlattribute.Value, ExpanderOptions.ExpandAll,
MockElementLocation
.Instance);
1713
Assert.Equal(@"@(Resource->'%(Filename)') ; @(Content) ; @(NonExistent) ; ; %(NonExistent) ; \jk ; l\mno%3bpqr\stu ; @(IntermediateAssembly->'%(RelativeDir)') ; %(Language)_%(Culture)", expander.ExpandIntoStringAndUnescape(value, ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance));
1715
Assert.Equal(@"@(Resource->'%(Filename)') ; @(Content) ; @(NonExistent) ; ; ; \jk ; l\mno%3bpqr\stu ; @(IntermediateAssembly->'%(RelativeDir)') ; english_abc%3bdef;ghi", expander.ExpandIntoStringAndUnescape(value, ExpanderOptions.ExpandPropertiesAndMetadata,
MockElementLocation
.Instance));
1717
Assert.Equal(@"string$(p);dialogs%3b ; splash.bmp ; ; ; ; \jk ; l\mno%3bpqr\stu ; subdir1" + Path.DirectorySeparatorChar + ";subdir2" + Path.DirectorySeparatorChar + " ; english_abc%3bdef;ghi", expander.ExpandIntoStringAndUnescape(value, ExpanderOptions.ExpandAll,
MockElementLocation
.Instance));
1719
Assert.Equal(@"string$(p);dialogs%3b ; splash.bmp ; ; $(NonExistent) ; %(NonExistent) ; $(OutputPath) ; $(TargetPath) ; %(Language)_%(Culture)", expander.ExpandIntoStringAndUnescape(value, ExpanderOptions.ExpandItems,
MockElementLocation
.Instance));
1737
IList<string> expanded = expander.ExpandIntoStringListLeaveEscaped(value, ExpanderOptions.ExpandAll,
MockElementLocation
.Instance).ToList();
1776
string result = expander.ExpandIntoStringLeaveEscaped(@"$(HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\VSTSDB@VSTSDBDirectory)", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
1792
string result = expander.ExpandIntoStringLeaveEscaped(@"$(Solutions.VSVersion)", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
1810
expander.ExpandIntoStringLeaveEscaped(@"$(HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\VSTSDB@XXXXDBDirectory)", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
1827
expander.ExpandIntoStringLeaveEscaped(@"$(HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\VSTSDB@VSTSDBDirectoryX)", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
1843
string result = expander.ExpandIntoStringLeaveEscaped(@"$(Registry:HKEY_CURRENT_USER\Software\Microsoft\MSBuild_test@Value)", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
1868
string result = expander.ExpandIntoStringLeaveEscaped(@"$(Registry:HKEY_CURRENT_USER\Software\Microsoft\MSBuild_test@Value)", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
1890
string result = expander.ExpandIntoStringLeaveEscaped(@"$(Registry:HKEY_CURRENT_USER\Software\Microsoft\MSBuild_test@Value)", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
1913
string result = expander.ExpandIntoStringLeaveEscaped(@"$(Registry:HKEY_CURRENT_USER\Software\Microsoft\MSBuild_test@Value)", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
1935
string result = expander.ExpandIntoStringLeaveEscaped(@"$(Registry:HKEY_CURRENT_USER\Software\Microsoft\MSBuild_test@Value)", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
1957
string result = expander.ExpandIntoStringLeaveEscaped(@"$(Registry:HKEY_CURRENT_USER\Software\Microsoft\MSBuild_test@Value)", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
2050
string result = expander.ExpandIntoStringLeaveEscaped("$([System.Convert]::ChangeType('null',$(SomeStuff.GetTypeCode())))", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
2066
string result = expander.ExpandIntoStringLeaveEscaped("$([System.Environment]::GetEnvironmentVariable(`_NonExistentVar`))", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
2070
result = expander.ExpandIntoStringLeaveEscaped("prefix_$([System.Environment]::GetEnvironmentVariable(`_NonExistentVar`))", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
2085
string result = expander.ExpandIntoStringLeaveEscaped("$(SomeStuff.ToUpperInvariant())", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
2101
string result = expander.ExpandIntoStringLeaveEscaped("$(FileName.Trim())", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
2117
string result = expander.ExpandIntoStringLeaveEscaped("$(SomeStuff.Length)", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
2133
string result = expander.ExpandIntoStringLeaveEscaped("$(SomeStuff.get_Length())", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
2149
string result = expander.ExpandIntoStringLeaveEscaped("$(SomeStuff.ToLowerInvariant())_goop", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
2165
string result = expander.ExpandIntoStringLeaveEscaped("$(SomeStuff.SubString(13))", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
2181
string result = expander.ExpandIntoStringLeaveEscaped("$(SomeStuff.SubString(8))", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
2198
string result = expander.ExpandIntoStringLeaveEscaped("$(MyPath.SubString($(RootPath.Length)))", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
2215
string result = expander.ExpandIntoStringLeaveEscaped("$(SomeStuff.SubString(1$(Value)))", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
2232
string result = expander.ExpandIntoStringLeaveEscaped(@"$(PathRoot2.Endswith(" + Path.DirectorySeparatorChar + "))", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
2234
result = expander.ExpandIntoStringLeaveEscaped(@"$(PathRoot.Endswith(" + Path.DirectorySeparatorChar + "))", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
2250
string result = expander.ExpandIntoStringLeaveEscaped("$(SomeStuff.SubString(1$(Value)).ToLowerInvariant().SubString($(Value)))", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
2268
string result = expander.ExpandIntoStringLeaveEscaped("$(SomeStuff.ToUpperInvariant().ToLowerInvariant())", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
2284
string result = expander.ExpandIntoStringLeaveEscaped("$(SomeStuff.SubString($(Value.get_Length())))", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
2299
string result = expander.ExpandIntoStringLeaveEscaped("$([MSBuild]::__GetListTest())", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
2315
string result = expander.ExpandIntoStringLeaveEscaped("$(List.Split(-))", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
2332
string result = expander.ExpandIntoStringLeaveEscaped("$([System.Environment]::GetEnvironmentVariables())", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance).ToUpperInvariant();
2350
string result = expander.ExpandIntoStringLeaveEscaped("$(List.Split($(Splitter.ToCharArray())))", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
2374
MockElementLocation
.Instance,
2384
MockElementLocation
.Instance,
2403
expander.ExpandIntoStringLeaveEscaped("[$(SomeStuff($(Value)))]", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
2421
expander.ExpandIntoStringLeaveEscaped("[$(SomeStuff.Lgg)]", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
2438
expander.ExpandIntoStringLeaveEscaped("$(SomeStuff.ToUpperInvariant().Foo)", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
2455
expander.ExpandIntoStringLeaveEscaped("[$(SomeStuff($(System.DateTime.Now)))]", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
2472
expander.ExpandIntoStringLeaveEscaped("$(SomeStuff.ToLowerInvariant()_goop)", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
2488
expander.ExpandIntoStringLeaveEscaped("[$(SomeStuff.Substring(HELLO!))]", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
2504
expander.ExpandIntoStringLeaveEscaped("[$(SomeStuff.Substring(-10))]", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
2519
expander.ExpandIntoStringLeaveEscaped("$(([System.DateTime]::Now).ToString(\"MM.dd.yyyy\"))", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
2532
string result = expander.ExpandIntoStringLeaveEscaped("[%(LowerLetterList.Identity.ToUpper())]", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
2548
string result = expander.ExpandIntoStringLeaveEscaped("$(System)", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
2567
string result = expander.ExpandIntoStringLeaveEscaped(@"$([MSBuild]::MakeRelative($(ParentPath), `$(FilePath)`))", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
2584
string result = expander.ExpandIntoStringLeaveEscaped(@"$([System.IO.Path]::Combine($(Drive), `$(File)`))", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
2600
object result = expander.ExpandPropertiesLeaveTypedAndEscaped(@"$([System.Version]::new($(ver1)))", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
2624
string result = expander.ExpandIntoStringLeaveEscaped(@"$([System.Version]::new($(ver1)).CompareTo($([System.Version]::new($(ver2)))))", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
2645
string result = expander.ExpandIntoStringLeaveEscaped("$([System.Type]::GetType(`System.Type`))", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
2672
string result = expander.ExpandIntoStringLeaveEscaped("$([System.Diagnostics.Process]::GetCurrentProcess().Id)", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
2701
Assert.Throws<InvalidProjectFileException>(() => expander.ExpandIntoStringLeaveEscaped("$([Microsoft.FOO.FileIO.FileSystem]::CurrentDirectory)", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance));
2702
Assert.Throws<InvalidProjectFileException>(() => expander.ExpandIntoStringLeaveEscaped("$([Foo.Baz]::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("$([.Foo]::new())", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance));
2706
Assert.Throws<InvalidProjectFileException>(() => expander.ExpandIntoStringLeaveEscaped("$([.]::new())", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance));
2707
Assert.Throws<InvalidProjectFileException>(() => expander.ExpandIntoStringLeaveEscaped("$([]::new())", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance));
2729
string result = expander.ExpandIntoStringLeaveEscaped(@"$([System.IO.Path]::Combine(`" + s_rootPathPrefix + "`, `$(File)`))", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
2747
ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
2765
ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
2782
Path.Combine(s_rootPathPrefix, "foo baz") + @" `, `$(File)`))", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
2798
string result = expander.ExpandIntoStringLeaveEscaped("$([System.DateTime]::Parse(" + dateTime + ").ToString(\"yyyy/MM/dd HH:mm:ss\"))", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
2813
string result = expander.ExpandIntoStringLeaveEscaped("$([System.DateTime]::Parse(" + dateTime + ").ToString(\"MM.dd.yyyy\"))", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
2828
string result = expander.ExpandIntoStringLeaveEscaped("$([System.DateTime]::Now.ToString(\"MM.dd.yyyy\"))", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
2846
@"`, $([System.IO.Path]::Combine(`foo`,`file.txt`))))", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
2863
string result = expander.ExpandIntoStringLeaveEscaped(@"$([System.Text.RegularExpressions.Regex]::IsMatch(`-42`, `^-?\d+(\.\d{2})?$`, `RegexOptions.IgnoreCase,RegexOptions.Singleline`))", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
2868
result = expander.ExpandIntoStringLeaveEscaped(@"$([System.Text.RegularExpressions.Regex]::IsMatch(`-42`, `^-?\d+(\.\d{2})?$`, System.Text.RegularExpressions.RegexOptions.IgnoreCase|RegexOptions.Singleline))", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
2872
result = expander.ExpandIntoStringLeaveEscaped(@"$([System.Text.RegularExpressions.Regex]::IsMatch(`100 GBP`, `^-?\d+(\.\d{2})?$`))", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
2887
string result = expander.ExpandIntoStringLeaveEscaped(@"$([System.DateTime]::Parse(" + dateTime + ").ToString(`yyyy/MM/dd HH:mm:ss`))", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
2902
string result = expander.ExpandIntoStringLeaveEscaped(@"$([System.Environment]::GetFolderPath(SpecialFolder.System))", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
2939
var result = expander.ExpandIntoStringLeaveEscaped(propertyFunction, ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
2961
expander.ExpandIntoStringLeaveEscaped(propertyFunction, ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance).ShouldBe(expected);
2983
expander.ExpandIntoStringLeaveEscaped(propertyFunction, ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance).ShouldBe(expected);
2999
expander.ExpandIntoStringLeaveEscaped(propertyFunction, ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance).ShouldBe(expected);
3015
expander.ExpandIntoStringLeaveEscaped(propertyFunction, ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance).ShouldBe(expected);
3033
expander.ExpandIntoStringLeaveEscaped(propertyFunction, ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance).ShouldBe(expected);
3049
expander.ExpandIntoStringLeaveEscaped(propertyFunction, ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance).ShouldBe(expected);
3068
expander.ExpandIntoStringLeaveEscaped(propertyFunction, ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance).ShouldBe(expected);
3084
expander.ExpandIntoStringLeaveEscaped(propertyFunction, ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance).ShouldBe(expected);
3103
expander.ExpandIntoStringLeaveEscaped(propertyFunction, ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance).ShouldBe(expected);
3116
expander.ExpandIntoStringLeaveEscaped(propertyFunction, ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance).ShouldBe(expected);
3128
expander.ExpandIntoStringLeaveEscaped(propertyFunction, ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance).ShouldBe(expected);
3139
expander.ExpandIntoStringLeaveEscaped(propertyFunction, ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance).ShouldBe(expected);
3152
expander.ExpandIntoStringLeaveEscaped(propertyFunction, ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance).ShouldBe(expected);
3163
expander.ExpandIntoStringLeaveEscaped(propertyFunction, ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance).ShouldBe(expected);
3175
expander.ExpandIntoStringLeaveEscaped(propertyFunction, ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance).ShouldBe(expected);
3186
expander.ExpandIntoStringLeaveEscaped(propertyFunction, ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance).ShouldBe(expected);
3199
expander.ExpandIntoStringLeaveEscaped(propertyFunction, ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance).ShouldBe(expected);
3210
expander.ExpandIntoStringLeaveEscaped(propertyFunction, ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance).ShouldBe(expected);
3223
expander.ExpandIntoStringLeaveEscaped(propertyFunction, ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance).ShouldBe(expected);
3246
expander.ExpandIntoStringLeaveEscaped(propertyFunction, ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance).ShouldBe(expectedExpansion);
3266
expander.ExpandIntoStringLeaveEscaped(propertyFunction, ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance).ShouldBe(expectedExpansion);
3277
var result = expander.ExpandIntoStringLeaveEscaped($"$([MSBuild]::IsOsPlatform({osPlatformLowerCase}))", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
3415
MockElementLocation
.Instance));
3425
MockElementLocation
.Instance);
3440
string result = expander.ExpandIntoStringLeaveEscaped("$([System.String]::Equals(`a`, `A`, StringComparison.OrdinalIgnoreCase))", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
3463
string result = expander.ExpandIntoStringAndUnescape(@"$([MSBuild]::GetDirectoryNameOfFileAbove($(StartingDirectory), $(FileToFind)))", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
3467
result = expander.ExpandIntoStringAndUnescape(@"$([MSBuild]::GetDirectoryNameOfFileAbove($(StartingDirectory), Hobbits))", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
3486
MockElementLocation
mockElementLocation = new MockElementLocation(Path.Combine(ObjectModelHelpers.TempProjectDir, "one", "two", "three", "four", "five", Path.GetRandomFileName()));
3540
expander.ExpandIntoStringLeaveEscaped(@"$([MSBuild]::GetPathOfFileAbove($(FileWithPath)))", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
3559
string result = expander.ExpandIntoStringLeaveEscaped(@"$([System.Globalization.CultureInfo]::new(`en-US`).ToString())", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
3575
string result = expander.ExpandIntoStringLeaveEscaped(@"$([MSBuild]::Add(40, 2))", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
3590
string result = expander.ExpandIntoStringLeaveEscaped(@"$([MSBuild]::Add(39.9, 2.1))", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
3605
string result = expander.ExpandIntoStringLeaveEscaped(@"$([MSBuild]::ValueOrDefault('', '42'))", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
3609
result = expander.ExpandIntoStringLeaveEscaped(@"$([MSBuild]::ValueOrDefault('42', '43'))", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
3626
string result = expander.ExpandIntoStringLeaveEscaped(@"$([MSBuild]::ValueOrDefault('$(DifferentTargetsPath)', '42'))", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
3632
result = expander.ExpandIntoStringLeaveEscaped(@"$([MSBuild]::ValueOrDefault('$(DifferentTargetsPath)', '43'))", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
3682
expander.ExpandIntoStringAndUnescape(@"$([MSBuild]::NormalizeDirectory($(MyPath)))", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance));
3686
expander.ExpandIntoStringAndUnescape(@"$([MSBuild]::NormalizeDirectory($(MyPath), $(MySecondPath)))", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance));
3701
expander.ExpandIntoStringLeaveEscaped(@"$([MSBuild]::DoesTaskHostExist('ASDF', 'CurrentArchitecture'))", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
3776
string result = expander.ExpandIntoStringLeaveEscaped(@"$([MSBuild]::BitwiseAnd(32,$([System.IO.File]::GetAttributes(" + tempFile + "))))", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
3798
string result = expander.ExpandIntoStringLeaveEscaped(@"$([MSBuild]::Add(39.9, 2.1))", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
3802
result = expander.ExpandIntoStringLeaveEscaped(@"$([MSBuild]::Add(40, 2))", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
3806
result = expander.ExpandIntoStringLeaveEscaped(@"$([MSBuild]::Subtract(44, 2))", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
3810
result = expander.ExpandIntoStringLeaveEscaped(@"$([MSBuild]::Subtract(42.9, 0.9))", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
3814
result = expander.ExpandIntoStringLeaveEscaped(@"$([MSBuild]::Multiply(21, 2))", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
3818
result = expander.ExpandIntoStringLeaveEscaped(@"$([MSBuild]::Multiply(84.0, 0.5))", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
3822
result = expander.ExpandIntoStringLeaveEscaped(@"$([MSBuild]::Divide(84, 2))", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
3826
result = expander.ExpandIntoStringLeaveEscaped(@"$([MSBuild]::Divide(84.4, 2.0))", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
3830
result = expander.ExpandIntoStringLeaveEscaped(@"$([MSBuild]::Modulo(85, 2))", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
3834
result = expander.ExpandIntoStringLeaveEscaped(@"$([MSBuild]::Modulo(2345.5, 43))", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
3849
expander.ExpandIntoStringLeaveEscaped(@"$([MSBuild]::BitwiseOr(40, 2))", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance).ShouldBe((40 | 2).ToString());
3850
expander.ExpandIntoStringLeaveEscaped(@"$([MSBuild]::BitwiseAnd(42, 2))", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance).ShouldBe((42 & 2).ToString());
3851
expander.ExpandIntoStringLeaveEscaped(@"$([MSBuild]::BitwiseXor(213, 255))", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance).ShouldBe((213 ^ 255).ToString());
3852
expander.ExpandIntoStringLeaveEscaped(@"$([MSBuild]::BitwiseNot(-43))", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance).ShouldBe((~-43).ToString());
3853
expander.ExpandIntoStringLeaveEscaped(@"$([MSBuild]::LeftShift(1, 2))", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance).ShouldBe((1 << 2).ToString());
3854
expander.ExpandIntoStringLeaveEscaped(@"$([MSBuild]::RightShift(-8, 2))", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance).ShouldBe((-8 >> 2).ToString());
3855
expander.ExpandIntoStringLeaveEscaped(@"$([MSBuild]::RightShiftUnsigned(-8, 2))", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance).ShouldBe((-8 >>> 2).ToString());
3869
string result = expander.ExpandIntoStringLeaveEscaped(@"$( SomeStuff )", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
3888
string result = expander.ExpandIntoStringLeaveEscaped(@"$([MSBuild]::GetRegistryValue('HKEY_CURRENT_USER\Software\Microsoft\MSBuild_test', '$(SomeProperty)'))", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
3912
string result = expander.ExpandIntoStringLeaveEscaped(@"$([MSBuild]::GetRegistryValue('HKEY_CURRENT_USER\Software\Microsoft\MSBuild_test', null))", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
3936
string result = expander.ExpandIntoStringLeaveEscaped(@"$([MSBuild]::GetRegistryValueFromView('HKEY_CURRENT_USER\Software\Microsoft\MSBuild_test', null, null, RegistryView.Default, RegistryView.Default))", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
3960
string result = expander.ExpandIntoStringLeaveEscaped(@"$([MSBuild]::GetRegistryValueFromView('HKEY_CURRENT_USER\Software\Microsoft\MSBuild_test', null, null, Microsoft.Win32.RegistryView.Default))", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
3991
string result = expander.ExpandIntoStringLeaveEscaped(@"$([System.IO.Path]::Combine($(SomePath),%(Compile.Identity)))", ExpanderOptions.ExpandAll,
MockElementLocation
.Instance);
4011
string result = expander.ExpandIntoStringLeaveEscaped($"$([System.String]::new(%({metadatumName})))", ExpanderOptions.ExpandAll,
MockElementLocation
.Instance);
4040
expander.ExpandPropertiesLeaveTypedAndEscaped($"$([MSBuild]::StableStringHash('{toHash}'{hashTypeString}))", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance))
4080
object hashValue = expander.ExpandPropertiesLeaveTypedAndEscaped($"$([MSBuild]::StableStringHash('FooBar'{hashTypeString}))", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
4093
string intermediate = expander.ExpandPropertiesLeaveTypedAndEscaped($"$([MSBuild]::ConvertToBase64('{testCase}'))", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance) as string;
4095
string original = expander.ExpandPropertiesLeaveTypedAndEscaped($"$([MSBuild]::ConvertFromBase64('{intermediate}'))", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance) as string;
4107
string intermediate = expander.ExpandPropertiesLeaveTypedAndEscaped($"$([MSBuild]::ConvertToBase64('{plaintext}'))", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance) as string;
4119
string original = expander.ExpandPropertiesLeaveTypedAndEscaped($"$([MSBuild]::ConvertFromBase64('{base64}'))", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance) as string;
4366
result = expander.ExpandIntoStringLeaveEscaped(validTests[i][0], ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
4390
result = expander.ExpandIntoStringLeaveEscaped(errorTests[i], ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
4420
string result = expander.ExpandIntoStringLeaveEscaped($"$([MSBuild]::EnsureTrailingSlash('{path}'))", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
4425
result = expander.ExpandIntoStringLeaveEscaped("$([MSBuild]::EnsureTrailingSlash($(SomeProperty)))", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
4445
string result = expander.ExpandIntoStringLeaveEscaped(propertyFunction, ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
4491
string result = expander.ExpandIntoStringLeaveEscaped("$([System.Guid]::NewGuid())", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
4503
var result = expander.ExpandIntoStringLeaveEscaped($"$([MSBuild]::CheckFeatureAvailability({featureName}))", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
4515
var result = expander.ExpandIntoStringLeaveEscaped($"$([MSBuild]::SubstringByAsciiChars({featureName}, {start}, {length}))", ExpanderOptions.ExpandProperties,
MockElementLocation
.Instance);
4850
MockElementLocation
.Instance);
4861
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);
Evaluation\ItemSpec_Tests.cs (1)
83
location ??=
MockElementLocation
.Instance;
ExpressionTree_Tests.cs (2)
438
GenericExpressionNode tree = p.Parse(expression, ParserOptions.AllowAll,
MockElementLocation
.Instance);
475
GenericExpressionNode tree = p.Parse(expression, ParserOptions.AllowAll,
MockElementLocation
.Instance);
Instance\ProjectTaskInstance_Internal_Tests.cs (5)
32
new Dictionary<string, (string,
MockElementLocation
)>(),
38
new Dictionary<string, (string,
MockElementLocation
)>
50
new Dictionary<string, (string,
MockElementLocation
)>
67
IDictionary<string, (string,
MockElementLocation
)> parameters,
70
parameters ??= new Dictionary<string, (string,
MockElementLocation
)>();
MockElementLocation.cs (2)
18
private static
MockElementLocation
s_instance = new MockElementLocation();
66
internal static
MockElementLocation
Instance
Parser_Tests.cs (2)
21
private
MockElementLocation
_elementLocation =
MockElementLocation
.Instance;
Scanner_Tests.cs (2)
18
private
MockElementLocation
_elementLocation =
MockElementLocation
.Instance;