3 instantiations of ProjectUsingTaskElement
Microsoft.Build (3)
Construction\ProjectUsingTaskElement.cs (1)
243
var usingTask = new
ProjectUsingTaskElement
(element, containingProject)
Evaluation\ProjectParser.cs (1)
527
ProjectUsingTaskElement usingTask = new
ProjectUsingTaskElement
(element, _project, _project);
ObjectModelRemoting\LinkedObjectFactory.cs (1)
220
return new
ProjectUsingTaskElement
(link);
229 references to ProjectUsingTaskElement
Microsoft.Build (31)
Construction\ProjectRootElement.cs (7)
344
public ICollection<
ProjectUsingTaskElement
> UsingTasks => GetChildrenOfType<
ProjectUsingTaskElement
>();
1227
public
ProjectUsingTaskElement
AddUsingTask(string name, string assemblyFile, string assemblyName)
1229
ProjectUsingTaskElement
usingTask = CreateUsingTaskElement(name, FileUtilities.FixFilePath(assemblyFile), assemblyName);
1430
public
ProjectUsingTaskElement
CreateUsingTaskElement(string taskName, string assemblyFile, string assemblyName)
1441
public
ProjectUsingTaskElement
CreateUsingTaskElement(string taskName, string assemblyFile, string assemblyName, string runtime, string architecture)
1443
return Link != null ? RootLink.CreateUsingTaskElement(taskName, assemblyFile, assemblyName, runtime, architecture) :
ProjectUsingTaskElement
.CreateDisconnected(taskName, assemblyFile, assemblyName, runtime, architecture, this);
Construction\ProjectUsingTaskBodyElement.cs (3)
33
internal ProjectUsingTaskBodyElement(XmlElementWithLocation xmlElement,
ProjectUsingTaskElement
parent, ProjectRootElement containingProject)
159
var
parentUsingTask = parent as
ProjectUsingTaskElement
;
Construction\ProjectUsingTaskElement.cs (2)
232
internal static
ProjectUsingTaskElement
CreateDisconnected(string taskName, string assemblyFile, string assemblyName, string runtime, string architecture, ProjectRootElement containingProject)
243
var
usingTask = new ProjectUsingTaskElement(element, containingProject)
Construction\UsingTaskParameterGroupElement.cs (2)
128
ProjectUsingTaskElement
parentUsingTask = parent as
ProjectUsingTaskElement
;
Definition\Toolset.cs (3)
1058
IEnumerable<(
ProjectUsingTaskElement
projectUsingTaskXml, string directoryOfImportingFile)> EnumerateTasksRegistrations()
1079
ProjectUsingTaskElement
usingTask = elementXml as
ProjectUsingTaskElement
;
Evaluation\Evaluator.cs (4)
96
private readonly List<KeyValuePair<string,
ProjectUsingTaskElement
>> _usingTaskElements;
247
_usingTaskElements = new List<KeyValuePair<string,
ProjectUsingTaskElement
>>();
917
case
ProjectUsingTaskElement
usingTask:
918
_usingTaskElements.Add(new KeyValuePair<string,
ProjectUsingTaskElement
>(currentProjectOrImport.DirectoryPath, usingTask));
Evaluation\ProjectParser.cs (2)
508
private
ProjectUsingTaskElement
ParseProjectUsingTaskElement(XmlElementWithLocation element)
527
ProjectUsingTaskElement
usingTask = new ProjectUsingTaskElement(element, _project, _project);
Instance\TaskRegistry.cs (5)
254
IEnumerable<(
ProjectUsingTaskElement
projectUsingTaskXml, string directoryOfImportingFile)> registrations,
262
foreach ((
ProjectUsingTaskElement
projectUsingTaskXml, string directoryOfImportingFile) registration in registrations)
288
ProjectUsingTaskElement
projectUsingTaskXml,
688
ProjectUsingTaskElement
projectUsingTaskInXml,
1612
internal void ExpandUsingTask<P, I>(
ProjectUsingTaskElement
projectUsingTaskXml, Expander<P, I> expander, ExpanderOptions expanderOptions)
ObjectModelRemoting\ConstructionObjectLinks\ProjectElementContainerLink.cs (1)
116
/// Allow for creating a local representation to external object of type <see cref="
ProjectUsingTaskElement
"/>
ObjectModelRemoting\ConstructionObjectLinks\ProjectRootElementLink.cs (1)
163
public abstract
ProjectUsingTaskElement
CreateUsingTaskElement(string taskName, string assemblyFile, string assemblyName, string runtime, string architecture);
ObjectModelRemoting\LinkedObjectFactory.cs (1)
218
public
ProjectUsingTaskElement
Create(ProjectUsingTaskElementLink link)
Microsoft.Build.Engine.OM.UnitTests (62)
Construction\ConstructionEditing_Tests.cs (12)
2613
var
element = ProjectRootElement.Create().AddUsingTask("n", "af", null);
2624
var
element = ProjectRootElement.Create().AddUsingTask("n", "af", null);
2635
var
element = ProjectRootElement.Create().AddUsingTask("n", null, "an");
2646
var
element = ProjectRootElement.Create().AddUsingTask("n", null, "an");
2657
var
usingTask = ProjectRootElement.Create().AddUsingTask("n", null, "an");
2670
var
usingTask = ProjectRootElement.Create().AddUsingTask("n", null, "an");
2683
var
usingTask = ProjectRootElement.Create().AddUsingTask("n", null, "an");
2696
var
usingTask = ProjectRootElement.Create().AddUsingTask("n", null, "an");
2960
var
usingTask = ProjectRootElement.Create().AddUsingTask("n", null, "an");
2973
var
usingTask = ProjectRootElement.Create().AddUsingTask("n", null, "an");
2986
var
usingTask = ProjectRootElement.Create().AddUsingTask("n", null, "an");
2999
var
usingTask = ProjectRootElement.Create().AddUsingTask("n", null, "an");
Construction\ProjectRootElement_Tests.cs (1)
1184
var
inlineUt = pre.AddUsingTask("anotherName", "somefile", null);
Construction\ProjectUsingTaskElement_Tests.cs (23)
190
ProjectUsingTaskElement
usingTask = GetUsingTaskAssemblyFile();
204
ProjectUsingTaskElement
usingTask = GetUsingTaskAssemblyName();
218
ProjectUsingTaskElement
usingTask = GetUsingTaskFactoryRuntimeAndPlatform();
233
ProjectUsingTaskElement
usingTask = GetUsingTaskFactoryRuntimeAndPlatform();
249
ProjectUsingTaskElement
usingTask = GetUsingTaskAssemblyFile();
263
ProjectUsingTaskElement
usingTask = GetUsingTaskAssemblyName();
279
ProjectUsingTaskElement
usingTask = GetUsingTaskAssemblyName();
292
ProjectUsingTaskElement
usingTask = GetUsingTaskAssemblyFile();
304
ProjectUsingTaskElement
usingTask = project.AddUsingTask("t", "af", null);
319
ProjectUsingTaskElement
usingTask = project.AddUsingTask("t", "af", null);
334
ProjectUsingTaskElement
usingTask = project.AddUsingTask("t", "af", null);
422
ProjectUsingTaskElement
usingTask = (
ProjectUsingTaskElement
)Helpers.GetFirst(project.Children);
474
private static
ProjectUsingTaskElement
GetUsingTaskFactoryRuntimeAndPlatform()
484
ProjectUsingTaskElement
usingTask = (
ProjectUsingTaskElement
)Helpers.GetFirst(project.Children);
491
private static
ProjectUsingTaskElement
GetUsingTaskAssemblyFile()
502
ProjectUsingTaskElement
usingTask = (
ProjectUsingTaskElement
)Helpers.GetFirst(project.Children);
509
private static
ProjectUsingTaskElement
GetUsingTaskAssemblyName()
519
ProjectUsingTaskElement
usingTask = (
ProjectUsingTaskElement
)Helpers.GetFirst(project.Children);
526
private static void VerifyAttributesRemoved(
ProjectUsingTaskElement
usingTask, string value)
Construction\UsingTaskBodyElement_Tests.cs (2)
140
ProjectUsingTaskElement
usingTask = (
ProjectUsingTaskElement
)Helpers.GetFirst(project.Children);
Construction\UsingTaskParameterElement_Tests.cs (2)
229
ProjectUsingTaskElement
usingTask = (
ProjectUsingTaskElement
)Helpers.GetFirst(project.Children);
Construction\UsingTaskParameterGroup_Tests.cs (2)
141
ProjectUsingTaskElement
usingTask = (
ProjectUsingTaskElement
)Helpers.GetFirst(project.Children);
ObjectModelRemoting\Helpers\ViewValidation.construction.cs (2)
759
public static void Verify(
ProjectUsingTaskElement
viewXml,
ProjectUsingTaskElement
realXml, ValidationContext context = null)
ObjectModelRemoting\Helpers\ViewValidation.cs (1)
179
if (VerifyCheckType<
ProjectUsingTaskElement
>(view, real, context, Verify))
ObjectModelRemoting\LinkedConstructionModify_Tests.cs (12)
98
xmlPair.Add2NewChildrenWithVerify<
ProjectUsingTaskElement
>("NewUsingTaskFile", (p, n) => p.AddUsingTask(n, "assemblyFile", null), (ut, n) => ut.TaskName == n, out var newUsinTaskFile1, out var newUsingTaskFile2);
99
xmlPair.Add2NewChildrenWithVerify<
ProjectUsingTaskElement
>("NewUsingTaskName", (p, n) => p.AddUsingTask(n, null, "assemblyName"), (ut, n) => ut.TaskName == n, out var newUsinTaskName1, out var newUsingTaskName2);
124
xmlPair.CreateWithVerify<
ProjectUsingTaskElement
>((p) => p.CreateUsingTaskElement("taskName", "file", null));
125
xmlPair.CreateWithVerify<
ProjectUsingTaskElement
>((p) => p.CreateUsingTaskElement("taskName", null, "name"));
126
xmlPair.CreateWithVerify<
ProjectUsingTaskElement
>((p) => p.CreateUsingTaskElement("taskName", "file", null, "runtime", "arch"));
127
xmlPair.CreateWithVerify<
ProjectUsingTaskElement
>((p) => p.CreateUsingTaskElement("taskName", null, "name", "runtime", "arch"));
488
var usingTaskFile = xmlPair.AddNewChaildWithVerify<
ProjectUsingTaskElement
>(ObjectType.View, "NewUsingTask", (p, n) => p.AddUsingTask(n, "assemblyFile", null), (ut, n) => true);
494
usingTaskFile.VerifySame(xmlPair.QuerySingleChildrenWithValidation<
ProjectUsingTaskElement
>((ut) => true));
512
var usingTaskName = xmlPair.AddNewChaildWithVerify<
ProjectUsingTaskElement
>(ObjectType.View, "NewUsingTask", (p, n) => p.AddUsingTask(n, null, "assemblyName"), (ut, n) => true);
522
var usingTask = xmlPair.AddNewChaildWithVerify<
ProjectUsingTaskElement
>(ObjectType.View, "NewUsingTask", (p, n) => p.AddUsingTask(n, "assemblyFile", null), (ut, n) => true);
537
var usingTask = xmlPair.AddNewChaildWithVerify<
ProjectUsingTaskElement
>(ObjectType.View, "NewUsingTask", (p, n) => p.AddUsingTask(n, "assemblyFile", null), (ut, n) => true);
558
var usingTask = xmlPair.AddNewChaildWithVerify<
ProjectUsingTaskElement
>(ObjectType.View, "NewUsingTask", (p, n) => p.AddUsingTask(n, "assemblyFile", null), (ut, n) => true);
ObjectModelRemoting\LinkedConstructionReadOnly_Tests.cs (2)
284
var realCollection = preReal.AllChildren.OfType<
ProjectUsingTaskElement
>().ToList();
285
var viewCollection = preView.AllChildren.OfType<
ProjectUsingTaskElement
>().ToList();
ObjectModelRemoting\RemoteProjectsProviderMock\ConstructionLinkMocks\MockProjectRootElementLink.cs (2)
294
public override
ProjectUsingTaskElement
CreateUsingTaskElement(string taskName, string assemblyFile, string assemblyName, string runtime, string architecture)
296
return (
ProjectUsingTaskElement
)this.Proxy.CreateUsingTaskElement(taskName, assemblyFile, assemblyName, runtime, architecture).Import(this.Linker);
ObjectModelRemoting\RemoteProjectsProviderMock\ConstructionLinkMocks\ProjectElemetExportHelper.cs (1)
70
ElementInfo.New<
ProjectUsingTaskElement
, MockProjectUsingTaskElementLinkRemoter>(),
Microsoft.Build.Engine.UnitTests (134)
BackEnd\TaskRegistry_Tests.cs (134)
104
List<
ProjectUsingTaskElement
> elementList = new List<
ProjectUsingTaskElement
>();
107
ProjectUsingTaskElement
element = project.AddUsingTask("CustomTask", null, "CustomTask, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null");
115
foreach (
ProjectUsingTaskElement
taskElement in elementList)
138
List<
ProjectUsingTaskElement
> elementList = new List<
ProjectUsingTaskElement
>();
141
ProjectUsingTaskElement
element = project.AddUsingTask("CustomTask", null, "CustomTask, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null");
155
foreach (
ProjectUsingTaskElement
taskElement in elementList)
180
List<
ProjectUsingTaskElement
> elementList = new List<
ProjectUsingTaskElement
>();
183
ProjectUsingTaskElement
element = project.AddUsingTask("CustomTask", null, "CustomTask, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null");
245
List<
ProjectUsingTaskElement
> elementList = new List<
ProjectUsingTaskElement
>();
248
ProjectUsingTaskElement
element = project.AddUsingTask("CustomTask", null, "CustomTasks, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null");
262
foreach (
ProjectUsingTaskElement
taskElement in elementList)
284
List<
ProjectUsingTaskElement
> elementList = new List<
ProjectUsingTaskElement
>();
287
ProjectUsingTaskElement
element = project.AddUsingTask("CustomTask", "Some\\Relative\\Path\\CustomTasks.dll", null);
312
List<
ProjectUsingTaskElement
> elementList = new List<
ProjectUsingTaskElement
>();
315
ProjectUsingTaskElement
element = project.AddUsingTask("Task", "c:\\TaskLocation\\Tasks.dll", null);
353
List<
ProjectUsingTaskElement
> elementList = new List<
ProjectUsingTaskElement
>();
356
ProjectUsingTaskElement
element = project.AddUsingTask("UnrelatedTask", _testTaskLocation, null);
389
List<
ProjectUsingTaskElement
> elementList = new List<
ProjectUsingTaskElement
>();
392
ProjectUsingTaskElement
element = project.AddUsingTask("UnrelatedTask", _testTaskLocation, null);
425
List<
ProjectUsingTaskElement
> elementList = new List<
ProjectUsingTaskElement
>();
428
ProjectUsingTaskElement
element = project.AddUsingTask(TestTaskName, _testTaskLocation, null);
463
List<
ProjectUsingTaskElement
> elementList = new List<
ProjectUsingTaskElement
>();
466
ProjectUsingTaskElement
element = project.AddUsingTask(TestTaskName, _testTaskLocation, null);
501
List<
ProjectUsingTaskElement
> elementList = new List<
ProjectUsingTaskElement
>();
504
ProjectUsingTaskElement
element = project.AddUsingTask(TestTaskName, _testTaskLocation, null);
568
List<
ProjectUsingTaskElement
> elementList = new List<
ProjectUsingTaskElement
>();
571
ProjectUsingTaskElement
element = project.AddUsingTask(TestTaskName, _testTaskLocation, null);
609
List<
ProjectUsingTaskElement
> elementList = new List<
ProjectUsingTaskElement
>();
612
ProjectUsingTaskElement
element = project.AddUsingTask(TestTaskName, _testTaskLocation, null);
617
ProjectUsingTaskElement
secondElement = project.AddUsingTask(TestTaskName, _testTaskLocation, null);
697
List<
ProjectUsingTaskElement
> elementList = new List<
ProjectUsingTaskElement
>();
700
ProjectUsingTaskElement
element = project.AddUsingTask(TestTaskName, _testTaskLocation, null);
770
List<
ProjectUsingTaskElement
> elementList = new List<
ProjectUsingTaskElement
>();
773
ProjectUsingTaskElement
element = project.AddUsingTask(TestTaskName, _testTaskLocation, null);
822
List<
ProjectUsingTaskElement
> elementList = new List<
ProjectUsingTaskElement
>();
825
ProjectUsingTaskElement
element = project.AddUsingTask(TestTaskName, _testTaskLocation, null);
936
List<
ProjectUsingTaskElement
> elementList = new List<
ProjectUsingTaskElement
>();
939
ProjectUsingTaskElement
element = project.AddUsingTask(TestTaskName, _testTaskLocation, null);
984
List<
ProjectUsingTaskElement
> elementList = new List<
ProjectUsingTaskElement
>();
987
ProjectUsingTaskElement
element = project.AddUsingTask(TestTaskName, _testTaskLocation, null);
1046
List<
ProjectUsingTaskElement
> elementList = new List<
ProjectUsingTaskElement
>();
1049
ProjectUsingTaskElement
element = project.AddUsingTask(TestTaskName, _testTaskLocation, null);
1109
List<
ProjectUsingTaskElement
> elementList = new List<
ProjectUsingTaskElement
>();
1112
ProjectUsingTaskElement
element = project.AddUsingTask("$(Property1)@(ThirdItem)$(Property2)", "Some\\$(Property3)\\Path\\CustomTasks.dll", null);
1132
foreach (
ProjectUsingTaskElement
taskElement in elementList)
1162
List<
ProjectUsingTaskElement
> elementList = new List<
ProjectUsingTaskElement
>();
1165
ProjectUsingTaskElement
element = project.AddUsingTask("$(Property1)@(ThirdItem)$(Property2)", "Some\\$(Property3)\\Path\\CustomTasks.dll", null);
1190
ProjectUsingTaskElement
taskElement = elementList[i];
1213
List<
ProjectUsingTaskElement
> elementList = new List<
ProjectUsingTaskElement
>();
1216
ProjectUsingTaskElement
element = project.AddUsingTask("Hello", "File", null);
1226
ProjectUsingTaskElement
taskElement = elementList[0];
1237
List<
ProjectUsingTaskElement
> elementList = new List<
ProjectUsingTaskElement
>();
1240
ProjectUsingTaskElement
element = project.AddUsingTask("Task1", AssemblyUtilities.GetAssemblyLocation(typeof(TaskRegistry_Tests.NullTaskTypeTaskFactory).GetTypeInfo().Assembly), null);
1262
List<
ProjectUsingTaskElement
> elementList = new List<
ProjectUsingTaskElement
>();
1265
ProjectUsingTaskElement
element = project.AddUsingTask("Name", "File", null);
1278
ProjectUsingTaskElement
taskElement = elementList[0];
1294
List<
ProjectUsingTaskElement
> elementList = new List<
ProjectUsingTaskElement
>();
1297
ProjectUsingTaskElement
element = project.AddUsingTask("Name", "File", null);
1314
ProjectUsingTaskElement
taskElement = elementList[0];
1349
List<
ProjectUsingTaskElement
> elementList = CreateParameterElementWithAttributes(output, required, type);
1364
List<
ProjectUsingTaskElement
> elementList = CreateParameterElementWithAttributes(output, required, type);
1381
List<
ProjectUsingTaskElement
> elementList = CreateParameterElementWithAttributes(output, required, type);
1424
List<
ProjectUsingTaskElement
> elementList = CreateParameterElementWithAttributes(output, required, type);
1470
List<
ProjectUsingTaskElement
> elementList = CreateParameterElementWithAttributes(output, required, type);
1488
List<
ProjectUsingTaskElement
> elementList = CreateParameterElementWithAttributes(output, required, type);
1559
List<
ProjectUsingTaskElement
> elementList = CreateParameterElementWithAttributes(output, required, type);
1574
List<
ProjectUsingTaskElement
> elementList = CreateParameterElementWithAttributes(output, required, type);
1589
List<
ProjectUsingTaskElement
> elementList = CreateParameterElementWithAttributes(output, required, type);
1606
List<
ProjectUsingTaskElement
> elementList = CreateParameterElementWithAttributes(output, required, type);
1621
List<
ProjectUsingTaskElement
> elementList = CreateParameterElementWithAttributes(output, required, type);
1636
List<
ProjectUsingTaskElement
> elementList = CreateParameterElementWithAttributes(output, required, type);
1653
List<
ProjectUsingTaskElement
> elementList = CreateParameterElementWithAttributes(output, required, type);
1664
List<
ProjectUsingTaskElement
> elementList = new List<
ProjectUsingTaskElement
>();
1667
ProjectUsingTaskElement
element = project.AddUsingTask("Name", "File", null);
1687
ProjectUsingTaskElement
taskElement = elementList[0];
1727
List<
ProjectUsingTaskElement
> elementList = new List<
ProjectUsingTaskElement
>();
1730
ProjectUsingTaskElement
element = project.AddUsingTask("Name", "File", null);
1751
List<
ProjectUsingTaskElement
> elementList = new List<
ProjectUsingTaskElement
>();
1754
ProjectUsingTaskElement
element = project.AddUsingTask("Name", "File", null);
1776
List<
ProjectUsingTaskElement
> elementList = CreateTaskBodyElementWithAttributes(bool.FalseString, body);
1790
List<
ProjectUsingTaskElement
> elementList = CreateTaskBodyElementWithAttributes(bool.TrueString, body);
1791
ProjectUsingTaskElement
taskElement = elementList[0];
1810
List<
ProjectUsingTaskElement
> elementList = CreateTaskBodyElementWithAttributes(evaluate, "");
1822
List<
ProjectUsingTaskElement
> elementList = CreateTaskBodyElementWithAttributes(evaluate, "");
1834
List<
ProjectUsingTaskElement
> elementList = CreateTaskBodyElementWithAttributes(evaluate, "");
1846
List<
ProjectUsingTaskElement
> elementList = CreateTaskBodyElementWithAttributes(evaluate, "");
1860
new List<
ProjectUsingTaskElement
>(),
1909
ProjectUsingTaskElement
simpleTask = project.AddUsingTask("t1", null, "a1");
1913
new List<
ProjectUsingTaskElement
>()
1921
ProjectUsingTaskElement
taskbyFile1 = project.AddUsingTask("t1", "f1", null);
1931
new List<
ProjectUsingTaskElement
>()
1938
ProjectUsingTaskElement
taskbyName = project.AddUsingTask("t1", null, "n2");
1948
new List<
ProjectUsingTaskElement
>()
1956
ProjectUsingTaskElement
taskByFile2 = project.AddUsingTask("t2", "n3", null);
1966
new List<
ProjectUsingTaskElement
>()
1979
public void TaskRegistryCanSerializeViaTranslator(List<
ProjectUsingTaskElement
> usingTaskElements, Toolset toolset)
2110
List<
ProjectUsingTaskElement
> elementList = CreateParameterElementWithAttributes(output, required, type);
2134
private static List<
ProjectUsingTaskElement
> CreateParameterElementWithAttributes(string output, string required, string type)
2136
List<
ProjectUsingTaskElement
> elementList = new List<
ProjectUsingTaskElement
>();
2139
ProjectUsingTaskElement
element = project.AddUsingTask("Name", "File", null);
2152
private static List<
ProjectUsingTaskElement
> CreateTaskBodyElementWithAttributes(string evaluate, string body)
2154
List<
ProjectUsingTaskElement
> elementList = new List<
ProjectUsingTaskElement
>();
2157
ProjectUsingTaskElement
element = project.AddUsingTask("Name", "File", null);
2180
internal TaskRegistry CreateTaskRegistryAndRegisterTasks(List<
ProjectUsingTaskElement
> usingTaskElements, Toolset toolset = null)
Microsoft.Build.Tasks.CodeAnalysis.UnitTests (1)
TargetTests.cs (1)
958
var
task = proj.Xml.AddUsingTask(taskName, string.Empty, Assembly.GetExecutingAssembly().FullName);
TaskUsageLogger (1)
TaskUsageLogger.cs (1)
247
foreach (
ProjectUsingTaskElement
usingTask in pre.UsingTasks)