9 instantiations of TaskRegistry
Microsoft.Build (7)
Definition\Project.cs (1)
4324
TaskRegistry = new
TaskRegistry
(Toolset, Project.ProjectCollection.ProjectRootElementCache);
Definition\Toolset.cs (2)
875
_defaultTaskRegistry = new
TaskRegistry
(projectRootElementCache);
981
_overrideTaskRegistry = new
TaskRegistry
(projectRootElementCache);
Instance\ProjectInstance.cs (3)
401
this.TaskRegistry = new
TaskRegistry
(Toolset, project.ProjectCollection.ProjectRootElementCache);
477
TaskRegistry = new
TaskRegistry
(Toolset, linkedProject.ProjectCollection.ProjectRootElementCache);
3142
this.TaskRegistry = new
TaskRegistry
(this.Toolset, ProjectRootElementCache);
Instance\TaskRegistry.cs (1)
1867
var instance = new
TaskRegistry
();
Microsoft.Build.Engine.UnitTests (2)
BackEnd\TaskRegistry_Tests.cs (2)
2183
? new
TaskRegistry
(toolset, ProjectCollection.GlobalProjectCollection.ProjectRootElementCache)
2184
: new
TaskRegistry
(ProjectCollection.GlobalProjectCollection.ProjectRootElementCache);
179 references to TaskRegistry
Microsoft.Build (22)
Definition\Project.cs (1)
4168
public
TaskRegistry
TaskRegistry { get; set; }
Definition\Toolset.cs (6)
166
private
TaskRegistry
_defaultTaskRegistry;
171
private
TaskRegistry
_overrideTaskRegistry;
824
internal
TaskRegistry
GetTaskRegistry(LoggingContext loggingContext, ProjectRootElementCacheBase projectRootElementCache)
850
internal
TaskRegistry
GetOverrideTaskRegistry(LoggingContext loggingContext, ProjectRootElementCacheBase projectRootElementCache)
1033
private void LoadAndRegisterFromTasksFile(string[] defaultTaskFiles, LoggingContext loggingContext, string taskFileError, ProjectRootElementCacheBase projectRootElementCache,
TaskRegistry
registry)
1038
TaskRegistry
.InitializeTaskRegistryFromUsingTaskElements<ProjectPropertyInstance, ProjectItemInstance>(
Evaluation\Evaluator.cs (1)
731
TaskRegistry
.InitializeTaskRegistryFromUsingTaskElements<P, I>(
Evaluation\IEvaluatorData.cs (1)
53
TaskRegistry
TaskRegistry
Evaluation\LazyItemEvaluator.EvaluatorData.cs (1)
203
public
TaskRegistry
TaskRegistry
Evaluation\PropertyTrackingEvaluatorDataWrapper.cs (1)
133
public
TaskRegistry
TaskRegistry { get => _wrapped.TaskRegistry; set => _wrapped.TaskRegistry = value; }
Instance\ProjectInstance.cs (4)
186
private
TaskRegistry
_taskRegistry;
1281
TaskRegistry
IEvaluatorData<ProjectPropertyInstance, ProjectItemInstance, ProjectMetadataInstance, ProjectItemDefinitionInstance>.TaskRegistry
1581
internal
TaskRegistry
TaskRegistry
2420
translator.Translate(ref _taskRegistry,
TaskRegistry
.FactoryForDeserialization);
Instance\TaskRegistry.cs (7)
255
TaskRegistry
taskRegistry,
275
taskRegistry._taskRegistrations ??=
TaskRegistry
.CreateRegisteredTaskDictionary();
289
TaskRegistry
taskRegistry,
547
TaskRegistry
toolsetRegistry = _toolset.GetOverrideTaskRegistry(targetLoggingContext, RootElementCache);
606
TaskRegistry
toolsetRegistry = _toolset.GetTaskRegistry(targetLoggingContext, RootElementCache);
1865
public static
TaskRegistry
FactoryForDeserialization(ITranslator translator)
1867
var
instance = new TaskRegistry();
Microsoft.Build.Engine.UnitTests (157)
BackEnd\TaskRegistry_Tests.cs (112)
110
TaskRegistry
registry = CreateTaskRegistryAndRegisterTasks(elementList);
117
List<
TaskRegistry
.RegisteredTaskRecord> registrationRecords = registry.TaskRegistrations[new
TaskRegistry
.RegisteredTaskIdentity(taskElement.TaskName, null)];
150
TaskRegistry
registry = CreateTaskRegistryAndRegisterTasks(elementList);
157
List<
TaskRegistry
.RegisteredTaskRecord> registrationRecords = registry.TaskRegistrations[new
TaskRegistry
.RegisteredTaskIdentity(taskElement.TaskName, null)];
192
TaskRegistry
registry = CreateTaskRegistryAndRegisterTasks(elementList);
201
List<
TaskRegistry
.RegisteredTaskRecord> singletonBucket = registry.TaskRegistrations[new
TaskRegistry
.RegisteredTaskIdentity(elementList[1].TaskName, null)];
210
List<
TaskRegistry
.RegisteredTaskRecord> duplicateBucket = registry.TaskRegistrations[new
TaskRegistry
.RegisteredTaskIdentity(elementList[0].TaskName, null)];
216
foreach (
TaskRegistry
.RegisteredTaskRecord record in duplicateBucket)
257
TaskRegistry
registry = CreateTaskRegistryAndRegisterTasks(elementList);
264
List<
TaskRegistry
.RegisteredTaskRecord> registrationRecords = registry.TaskRegistrations[new
TaskRegistry
.RegisteredTaskIdentity(taskElement.TaskName, null)];
296
TaskRegistry
registry = CreateTaskRegistryAndRegisterTasks(elementList);
335
TaskRegistry
registry = CreateTaskRegistryAndRegisterTasks(elementList);
359
TaskRegistry
registry = CreateTaskRegistryAndRegisterTasks(elementList);
395
TaskRegistry
registry = CreateTaskRegistryAndRegisterTasks(elementList);
433
TaskRegistry
registry = CreateTaskRegistryAndRegisterTasks(elementList);
471
TaskRegistry
registry = CreateTaskRegistryAndRegisterTasks(elementList);
509
TaskRegistry
registry = CreateTaskRegistryAndRegisterTasks(elementList);
576
TaskRegistry
registry = CreateTaskRegistryAndRegisterTasks(elementList);
622
TaskRegistry
registry = CreateTaskRegistryAndRegisterTasks(elementList);
705
TaskRegistry
registry = CreateTaskRegistryAndRegisterTasks(elementList);
778
TaskRegistry
registry = CreateTaskRegistryAndRegisterTasks(elementList);
835
TaskRegistry
registry = CreateTaskRegistryAndRegisterTasks(elementList);
949
TaskRegistry
registry = CreateTaskRegistryAndRegisterTasks(elementList);
992
TaskRegistry
registry = CreateTaskRegistryAndRegisterTasks(elementList);
1054
TaskRegistry
registry = CreateTaskRegistryAndRegisterTasks(elementList);
1125
TaskRegistry
registry = CreateTaskRegistryAndRegisterTasks(elementList);
1130
IDictionary<
TaskRegistry
.RegisteredTaskIdentity, List<
TaskRegistry
.RegisteredTaskRecord>> registeredTasks = registry.TaskRegistrations;
1143
List<
TaskRegistry
.RegisteredTaskRecord> registeredTaskRecords = registry.TaskRegistrations[new
TaskRegistry
.RegisteredTaskIdentity(expandedtaskName, null)];
1181
TaskRegistry
registry = CreateTaskRegistryAndRegisterTasks(elementList);
1186
IDictionary<
TaskRegistry
.RegisteredTaskIdentity, List<
TaskRegistry
.RegisteredTaskRecord>> registeredTasks = registry.TaskRegistrations;
1198
List<
TaskRegistry
.RegisteredTaskRecord> registeredTaskRecords = registry.TaskRegistrations[new
TaskRegistry
.RegisteredTaskIdentity(expandedtaskName, null)];
1219
TaskRegistry
registry = CreateTaskRegistryAndRegisterTasks(elementList);
1224
IDictionary<
TaskRegistry
.RegisteredTaskIdentity, List<
TaskRegistry
.RegisteredTaskRecord>> registeredTasks = registry.TaskRegistrations;
1227
List<
TaskRegistry
.RegisteredTaskRecord> registeredTaskRecords = registry.TaskRegistrations[new
TaskRegistry
.RegisteredTaskIdentity("Hello", null)];
1245
TaskRegistry
registry = CreateTaskRegistryAndRegisterTasks(elementList);
1272
TaskRegistry
registry = CreateTaskRegistryAndRegisterTasks(elementList);
1276
IDictionary<
TaskRegistry
.RegisteredTaskIdentity, List<
TaskRegistry
.RegisteredTaskRecord>> registeredTasks = registry.TaskRegistrations;
1279
List<
TaskRegistry
.RegisteredTaskRecord> registeredTaskRecords = registry.TaskRegistrations[new
TaskRegistry
.RegisteredTaskIdentity("Name", null)];
1282
TaskRegistry
.RegisteredTaskRecord.ParameterGroupAndTaskElementRecord inlineTaskRecord = registeredTaskRecords[0].ParameterGroupAndTaskBody;
1308
TaskRegistry
registry = CreateTaskRegistryAndRegisterTasks(elementList);
1312
IDictionary<
TaskRegistry
.RegisteredTaskIdentity, List<
TaskRegistry
.RegisteredTaskRecord>> registeredTasks = registry.TaskRegistrations;
1315
List<
TaskRegistry
.RegisteredTaskRecord> registeredTaskRecords = registry.TaskRegistrations[new
TaskRegistry
.RegisteredTaskIdentity("Name", null)];
1319
TaskRegistry
.RegisteredTaskRecord.ParameterGroupAndTaskElementRecord inlineTaskRecord = registeredTaskRecords[0].ParameterGroupAndTaskBody;
1350
TaskRegistry
registry = CreateTaskRegistryAndRegisterTasks(elementList);
1351
Assert.True(registry.TaskRegistrations[new
TaskRegistry
.RegisteredTaskIdentity("Name", null)][0].ParameterGroupAndTaskBody.UsingTaskParameters["ParameterWithAllAttributesHardCoded"].PropertyType.Equals(typeof(String)));
1365
TaskRegistry
registry = CreateTaskRegistryAndRegisterTasks(elementList);
1366
Assert.True(registry.TaskRegistrations[new
TaskRegistry
.RegisteredTaskIdentity("Name", null)][0].ParameterGroupAndTaskBody.UsingTaskParameters["ParameterWithAllAttributesHardCoded"].PropertyType.Equals(typeof(String)));
1425
TaskRegistry
registry = CreateTaskRegistryAndRegisterTasks(elementList);
1471
TaskRegistry
registry = CreateTaskRegistryAndRegisterTasks(elementList);
1489
TaskRegistry
registry = CreateTaskRegistryAndRegisterTasks(elementList);
1560
TaskRegistry
registry = CreateTaskRegistryAndRegisterTasks(elementList);
1575
TaskRegistry
registry = CreateTaskRegistryAndRegisterTasks(elementList);
1576
Assert.False(((TaskPropertyInfo)registry.TaskRegistrations[new
TaskRegistry
.RegisteredTaskIdentity("Name", null)][0].ParameterGroupAndTaskBody.UsingTaskParameters["ParameterWithAllAttributesHardCoded"]).Output);
1590
TaskRegistry
registry = CreateTaskRegistryAndRegisterTasks(elementList);
1591
Assert.False(((TaskPropertyInfo)registry.TaskRegistrations[new
TaskRegistry
.RegisteredTaskIdentity("Name", null)][0].ParameterGroupAndTaskBody.UsingTaskParameters["ParameterWithAllAttributesHardCoded"]).Output);
1622
TaskRegistry
registry = CreateTaskRegistryAndRegisterTasks(elementList);
1623
Assert.False(((TaskPropertyInfo)registry.TaskRegistrations[new
TaskRegistry
.RegisteredTaskIdentity("Name", null)][0].ParameterGroupAndTaskBody.UsingTaskParameters["ParameterWithAllAttributesHardCoded"]).Required);
1637
TaskRegistry
registry = CreateTaskRegistryAndRegisterTasks(elementList);
1638
Assert.False(((TaskPropertyInfo)registry.TaskRegistrations[new
TaskRegistry
.RegisteredTaskIdentity("Name", null)][0].ParameterGroupAndTaskBody.UsingTaskParameters["ParameterWithAllAttributesHardCoded"]).Required);
1681
TaskRegistry
registry = CreateTaskRegistryAndRegisterTasks(elementList);
1685
IDictionary<
TaskRegistry
.RegisteredTaskIdentity, List<
TaskRegistry
.RegisteredTaskRecord>> registeredTasks = registry.TaskRegistrations;
1688
List<
TaskRegistry
.RegisteredTaskRecord> registeredTaskRecords = registry.TaskRegistrations[new
TaskRegistry
.RegisteredTaskIdentity("Name", null)];
1692
TaskRegistry
.RegisteredTaskRecord.ParameterGroupAndTaskElementRecord inlineTaskRecord = registeredTaskRecords[0].ParameterGroupAndTaskBody;
1735
TaskRegistry
registry = CreateTaskRegistryAndRegisterTasks(elementList);
1737
List<
TaskRegistry
.RegisteredTaskRecord> registeredTaskRecords = registry.TaskRegistrations[new
TaskRegistry
.RegisteredTaskIdentity("Name", null)];
1740
TaskRegistry
.RegisteredTaskRecord.ParameterGroupAndTaskElementRecord inlineTaskRecord = registeredTaskRecords[0].ParameterGroupAndTaskBody;
1759
TaskRegistry
registry = CreateTaskRegistryAndRegisterTasks(elementList);
1761
List<
TaskRegistry
.RegisteredTaskRecord> registeredTaskRecords = registry.TaskRegistrations[new
TaskRegistry
.RegisteredTaskIdentity("Name", null)];
1764
TaskRegistry
.RegisteredTaskRecord.ParameterGroupAndTaskElementRecord inlineTaskRecord = registeredTaskRecords[0].ParameterGroupAndTaskBody;
1777
TaskRegistry
registry = CreateTaskRegistryAndRegisterTasks(elementList);
1780
Assert.False(registry.TaskRegistrations[new
TaskRegistry
.RegisteredTaskIdentity("Name", null)][0].ParameterGroupAndTaskBody.TaskBodyEvaluated.Equals(body));
1795
TaskRegistry
registry = CreateTaskRegistryAndRegisterTasks(elementList);
1798
Assert.False(registry.TaskRegistrations[new
TaskRegistry
.RegisteredTaskIdentity("Name", null)][0].ParameterGroupAndTaskBody.TaskBodyEvaluated.Equals(expandedBody));
1823
TaskRegistry
registry = CreateTaskRegistryAndRegisterTasks(elementList);
1824
Assert.False(registry.TaskRegistrations[new
TaskRegistry
.RegisteredTaskIdentity("Name", null)][0].ParameterGroupAndTaskBody.TaskBodyEvaluated);
1835
TaskRegistry
registry = CreateTaskRegistryAndRegisterTasks(elementList);
1836
Assert.True(registry.TaskRegistrations[new
TaskRegistry
.RegisteredTaskIdentity("Name", null)][0].ParameterGroupAndTaskBody.TaskBodyEvaluated);
1847
TaskRegistry
registry = CreateTaskRegistryAndRegisterTasks(elementList);
1848
Assert.True(registry.TaskRegistrations[new
TaskRegistry
.RegisteredTaskIdentity("Name", null)][0].ParameterGroupAndTaskBody.TaskBodyEvaluated);
1981
var
original = CreateTaskRegistryAndRegisterTasks(usingTaskElements, toolset);
1985
var
copy =
TaskRegistry
.FactoryForDeserialization(TranslationHelpers.GetReadTranslator());
2002
TaskRegistry
registry,
2044
TaskRegistry
registry,
2072
private void RetrieveAndValidateRegisteredTaskRecord(
TaskRegistry
registry, bool exactMatchRequired, Dictionary<string, string> taskParameters, bool shouldBeRetrieved, bool shouldBeRetrievedFromCache)
2094
private void RetrieveAndValidateRegisteredTaskRecord(
TaskRegistry
registry, bool exactMatchRequired, string runtime, string architecture, bool shouldBeRetrieved, bool shouldBeRetrievedFromCache)
2111
TaskRegistry
registry = CreateTaskRegistryAndRegisterTasks(elementList);
2128
Assert.True(registry.TaskRegistrations[new
TaskRegistry
.RegisteredTaskIdentity("Name", null)][0].ParameterGroupAndTaskBody.UsingTaskParameters["ParameterWithAllAttributesHardCoded"].PropertyType.Equals(paramType));
2172
internal static int GetDeepCountOfRegisteredTasks(IDictionary<
TaskRegistry
.RegisteredTaskIdentity, List<
TaskRegistry
.RegisteredTaskRecord>> registryRecords)
2180
internal
TaskRegistry
CreateTaskRegistryAndRegisterTasks(List<ProjectUsingTaskElement> usingTaskElements, Toolset toolset = null)
2182
TaskRegistry
registry = toolset != null
2187
TaskRegistry
.InitializeTaskRegistryFromUsingTaskElements(
Definition\ToolsVersion_Tests.cs (27)
41
TaskRegistry
taskRegistry = (
TaskRegistry
)t.GetTaskRegistry(loggingContext, e.ProjectRootElementCache);
42
TaskRegistry
taskoverrideRegistry = (
TaskRegistry
)t.GetOverrideTaskRegistry(loggingContext, e.ProjectRootElementCache);
52
Assert.True(taskRegistry.TaskRegistrations.ContainsKey(new
TaskRegistry
.RegisteredTaskIdentity(expectedRegisteredTask, null)),
58
Assert.True(taskoverrideRegistry.TaskRegistrations.ContainsKey(new
TaskRegistry
.RegisteredTaskIdentity(expectedRegisteredTask, null)),
64
Assert.False(taskRegistry.TaskRegistrations.ContainsKey(new
TaskRegistry
.RegisteredTaskIdentity(unexpectedRegisteredTask, null)),
70
Assert.False(taskoverrideRegistry.TaskRegistrations.ContainsKey(new
TaskRegistry
.RegisteredTaskIdentity(unexpectedRegisteredTask, null)),
89
TaskRegistry
taskoverrideRegistry = (
TaskRegistry
)t.GetOverrideTaskRegistry(loggingContext, e.ProjectRootElementCache);
108
TaskRegistry
taskoverrideRegistry = (
TaskRegistry
)t.GetOverrideTaskRegistry(loggingContext, e.ProjectRootElementCache);
127
TaskRegistry
taskoverrideRegistry = (
TaskRegistry
)t.GetOverrideTaskRegistry(loggingContext, e.ProjectRootElementCache);
147
TaskRegistry
taskoverrideRegistry = (
TaskRegistry
)t.GetOverrideTaskRegistry(loggingContext, e.ProjectRootElementCache);
170
TaskRegistry
taskRegistry = (
TaskRegistry
)t.GetTaskRegistry(loggingContext, ProjectCollection.GlobalProjectCollection.ProjectRootElementCache);
177
Assert.True(taskRegistry.TaskRegistrations.ContainsKey(new
TaskRegistry
.RegisteredTaskIdentity(expectedRegisteredTask, null)),
182
Assert.False(taskRegistry.TaskRegistrations.ContainsKey(new
TaskRegistry
.RegisteredTaskIdentity(unexpectedRegisteredTask, null)),
200
TaskRegistry
taskRegistry = (
TaskRegistry
)t.GetTaskRegistry(loggingContext, ProjectCollection.GlobalProjectCollection.ProjectRootElementCache);
207
Assert.False(taskRegistry.TaskRegistrations.ContainsKey(new
TaskRegistry
.RegisteredTaskIdentity(unexpectedRegisteredTask, null)),
223
TaskRegistry
taskRegistry = (
TaskRegistry
)t.GetTaskRegistry(loggingContext, ProjectCollection.GlobalProjectCollection.ProjectRootElementCache);
938
TaskRegistry
taskRegistry = (
TaskRegistry
)t.GetTaskRegistry(loggingContext, ProjectCollection.GlobalProjectCollection.ProjectRootElementCache);
Instance\ProjectInstance_Internal_Tests.cs (4)
74
project.TaskRegistry.TaskRegistrations[new
TaskRegistry
.RegisteredTaskIdentity("t0", null)][0].TaskFactoryAssemblyLoadInfo.AssemblyFile.ShouldBe(Path.Combine(Directory.GetCurrentDirectory(), "af0"));
75
project.TaskRegistry.TaskRegistrations[new
TaskRegistry
.RegisteredTaskIdentity("t1", null)][0].TaskFactoryAssemblyLoadInfo.AssemblyFile.ShouldBe(Path.Combine(Directory.GetCurrentDirectory(), "af1a"));
76
project.TaskRegistry.TaskRegistrations[new
TaskRegistry
.RegisteredTaskIdentity("t1", null)][1].TaskFactoryAssemblyLoadInfo.AssemblyName.ShouldBe("an1");
77
project.TaskRegistry.TaskRegistrations[new
TaskRegistry
.RegisteredTaskIdentity("t2", null)][0].TaskFactoryAssemblyLoadInfo.AssemblyName.ShouldBe("an2");
TestComparers\TaskRegistryComparers.cs (14)
18
internal sealed class TaskRegistryComparer : IEqualityComparer<
TaskRegistry
>
20
public bool Equals(
TaskRegistry
x,
TaskRegistry
y)
30
Assert.Equal(xp.Key, yp.Key,
TaskRegistry
.RegisteredTaskIdentity.RegisteredTaskIdentityComparer.Exact);
37
public int GetHashCode(
TaskRegistry
obj)
43
internal sealed class RegisteredTaskRecordComparer : IEqualityComparer<
TaskRegistry
.RegisteredTaskRecord>
45
public bool Equals(
TaskRegistry
.RegisteredTaskRecord x,
TaskRegistry
.RegisteredTaskRecord y)
47
Assert.Equal(x.TaskIdentity, y.TaskIdentity,
TaskRegistry
.RegisteredTaskIdentity.RegisteredTaskIdentityComparer.Exact);
65
public int GetHashCode(
TaskRegistry
.RegisteredTaskRecord obj)
71
internal sealed class ParamterGroupAndTaskBodyComparer : IEqualityComparer<
TaskRegistry
.RegisteredTaskRecord.ParameterGroupAndTaskElementRecord>
74
TaskRegistry
.RegisteredTaskRecord.ParameterGroupAndTaskElementRecord x,
75
TaskRegistry
.RegisteredTaskRecord.ParameterGroupAndTaskElementRecord y)
92
public int GetHashCode(
TaskRegistry
.RegisteredTaskRecord.ParameterGroupAndTaskElementRecord obj)