348 references to BuildComponentType
Microsoft.Build (168)
BackEnd\BuildManager\BuildManager.cs (25)
375
private ISdkResolverService SdkResolverService => ((this as IBuildComponentHost).GetComponent(
BuildComponentType
.SdkResolverService) as ISdkResolverService)!;
381
ILoggingService IBuildComponentHost.LoggingService => _componentFactories.GetComponent<ILoggingService>(
BuildComponentType
.LoggingService);
605
NodeLauncher nodeLauncher = ((IBuildComponentHost)this).GetComponent<NodeLauncher>(
BuildComponentType
.NodeLauncher);
625
_nodeManager = ((IBuildComponentHost)this).GetComponent(
BuildComponentType
.NodeManager) as INodeManager;
659
_taskHostNodeManager = ((IBuildComponentHost)this).GetComponent<INodeManager>(
BuildComponentType
.TaskHostNodeManager);
660
_scheduler = ((IBuildComponentHost)this).GetComponent<IScheduler>(
BuildComponentType
.Scheduler);
751
_configCache = ((IBuildComponentHost)this).GetComponent<IConfigCache>(
BuildComponentType
.ConfigCache);
752
_resultsCache = ((IBuildComponentHost)this).GetComponent<IResultsCache>(
BuildComponentType
.ResultsCache);
909
_configCache = ((IBuildComponentHost)this).GetComponent<IConfigCache>(
BuildComponentType
.ConfigCache);
910
_resultsCache = ((IBuildComponentHost)this).GetComponent<IResultsCache>(
BuildComponentType
.ResultsCache);
930
_configCache = ((IBuildComponentHost)this).GetComponent(
BuildComponentType
.ConfigCache) as IConfigCache;
1426
_nodeManager ??= (INodeManager)((IBuildComponentHost)this).GetComponent(
BuildComponentType
.NodeManager);
1466
void IBuildComponentHost.RegisterFactory(
BuildComponentType
componentType, BuildComponentFactoryDelegate factory)
1476
IBuildComponent IBuildComponentHost.GetComponent(
BuildComponentType
type)
1481
TComponent IBuildComponentHost.GetComponent<TComponent>(
BuildComponentType
type)
2752
ILoggingService loggingService = ((IBuildComponentHost)this).GetComponent<ILoggingService>(
BuildComponentType
.LoggingService);
2765
ILoggingService loggingService = ((IBuildComponentHost)this).GetComponent<ILoggingService>(
BuildComponentType
.LoggingService);
2939
IConfigCache configCache = _componentFactories.GetComponent<IConfigCache>(
BuildComponentType
.ConfigCache);
3037
ILoggingService loggingService = ((IBuildComponentHost)this).GetComponent<ILoggingService>(
BuildComponentType
.LoggingService);
3188
_componentFactories.ReplaceFactory(
BuildComponentType
.LoggingService, loggingService as IBuildComponent);
3201
((IBuildComponentHost)this).GetComponent(
BuildComponentType
.BuildCheckManagerProvider) as IBuildCheckManagerProvider;
3409
_componentFactories.ShutdownComponent(
BuildComponentType
.LoggingService);
3416
_componentFactories.ReplaceFactory(
BuildComponentType
.LoggingService, (IBuildComponent?)null);
3517
_componentFactories.ReplaceFactory(
BuildComponentType
.ConfigCache, new ConfigCacheWithOverride(cacheAggregation.ConfigCache));
3518
_componentFactories.ReplaceFactory(
BuildComponentType
.ResultsCache, new ResultsCacheWithOverride(cacheAggregation.ResultsCache));
BackEnd\Components\BuildComponentFactoryCollection.cs (48)
26
private readonly Dictionary<
BuildComponentType
, BuildComponentEntry> _componentEntriesByType;
39
_componentEntriesByType = new Dictionary<
BuildComponentType
, BuildComponentEntry>();
63
_componentEntriesByType[
BuildComponentType
.Scheduler] = new BuildComponentEntry(
BuildComponentType
.Scheduler, Scheduler.CreateComponent, CreationPattern.Singleton);
64
_componentEntriesByType[
BuildComponentType
.ConfigCache] = new BuildComponentEntry(
BuildComponentType
.ConfigCache, ConfigCache.CreateComponent, CreationPattern.Singleton);
65
_componentEntriesByType[
BuildComponentType
.ResultsCache] = new BuildComponentEntry(
BuildComponentType
.ResultsCache, ResultsCache.CreateComponent, CreationPattern.Singleton);
66
_componentEntriesByType[
BuildComponentType
.NodeManager] = new BuildComponentEntry(
BuildComponentType
.NodeManager, NodeManager.CreateComponent, CreationPattern.Singleton);
67
_componentEntriesByType[
BuildComponentType
.TaskHostNodeManager] = new BuildComponentEntry(
BuildComponentType
.TaskHostNodeManager, TaskHostNodeManager.CreateComponent, CreationPattern.Singleton);
69
_componentEntriesByType[
BuildComponentType
.NodeLauncher] = new BuildComponentEntry(
BuildComponentType
.NodeLauncher, NodeLauncher.CreateComponent, CreationPattern.Singleton);
70
_componentEntriesByType[
BuildComponentType
.InProcNodeProvider] = new BuildComponentEntry(
BuildComponentType
.InProcNodeProvider, NodeProviderInProc.CreateComponent, CreationPattern.Singleton);
71
_componentEntriesByType[
BuildComponentType
.OutOfProcNodeProvider] = new BuildComponentEntry(
BuildComponentType
.OutOfProcNodeProvider, NodeProviderOutOfProc.CreateComponent, CreationPattern.Singleton);
72
_componentEntriesByType[
BuildComponentType
.OutOfProcTaskHostNodeProvider] = new BuildComponentEntry(
BuildComponentType
.OutOfProcTaskHostNodeProvider, NodeProviderOutOfProcTaskHost.CreateComponent, CreationPattern.Singleton);
77
_componentEntriesByType[
BuildComponentType
.RequestEngine] = new BuildComponentEntry(
BuildComponentType
.RequestEngine, BuildRequestEngine.CreateComponent, CreationPattern.Singleton);
81
_componentEntriesByType[
BuildComponentType
.LoggingService] = new BuildComponentEntry(
BuildComponentType
.LoggingService, null);
82
_componentEntriesByType[
BuildComponentType
.RequestBuilder] = new BuildComponentEntry(
BuildComponentType
.RequestBuilder, RequestBuilder.CreateComponent, CreationPattern.CreateAlways);
84
_componentEntriesByType[
BuildComponentType
.BuildCheckManagerProvider] = new BuildComponentEntry(
BuildComponentType
.BuildCheckManagerProvider, BuildCheckManagerProvider.CreateComponent, CreationPattern.Singleton);
85
_componentEntriesByType[
BuildComponentType
.TelemetryCollector] = new BuildComponentEntry(
BuildComponentType
.TelemetryCollector, TelemetryCollectorProvider.CreateComponent, CreationPattern.Singleton);
86
_componentEntriesByType[
BuildComponentType
.TargetBuilder] = new BuildComponentEntry(
BuildComponentType
.TargetBuilder, TargetBuilder.CreateComponent, CreationPattern.CreateAlways);
87
_componentEntriesByType[
BuildComponentType
.TaskBuilder] = new BuildComponentEntry(
BuildComponentType
.TaskBuilder, TaskBuilder.CreateComponent, CreationPattern.CreateAlways);
88
_componentEntriesByType[
BuildComponentType
.RegisteredTaskObjectCache] = new BuildComponentEntry(
BuildComponentType
.RegisteredTaskObjectCache, RegisteredTaskObjectCache.CreateComponent, CreationPattern.Singleton);
91
_componentEntriesByType[
BuildComponentType
.SdkResolverService] = new BuildComponentEntry(
BuildComponentType
.SdkResolverService, MainNodeSdkResolverService.CreateComponent, CreationPattern.Singleton);
103
foreach (KeyValuePair<
BuildComponentType
, BuildComponentEntry> componentEntry in _componentEntriesByType)
115
public void ShutdownComponent(
BuildComponentType
componentType)
126
public void ReplaceFactory(
BuildComponentType
componentType, BuildComponentFactoryDelegate factory)
137
public void ReplaceFactory(
BuildComponentType
componentType, IBuildComponent instance)
149
public void AddFactory(
BuildComponentType
componentType, BuildComponentFactoryDelegate factory, CreationPattern creationPattern)
159
public IBuildComponent GetComponent(
BuildComponentType
type)
169
internal TComponent GetComponent<TComponent>(
BuildComponentType
type) where TComponent : IBuildComponent
192
public BuildComponentEntry(
BuildComponentType
type, BuildComponentFactoryDelegate factory, CreationPattern pattern)
202
public BuildComponentEntry(
BuildComponentType
type, IBuildComponent singleton)
212
private
BuildComponentType
ComponentType { get; }
BackEnd\Components\BuildRequestEngine\BuildRequestEngine.cs (15)
213
var telemetryProvider = (TelemetryCollectorProvider)_componentHost.GetComponent(
BuildComponentType
.TelemetryCollector);
307
IBuildCheckManagerProvider buildCheckProvider = (_componentHost.GetComponent(
BuildComponentType
.BuildCheckManagerProvider) as IBuildCheckManagerProvider);
365
IResultsCache cache = (IResultsCache)_componentHost.GetComponent(
BuildComponentType
.ResultsCache);
368
BuildRequestConfiguration config = ((IConfigCache)_componentHost.GetComponent(
BuildComponentType
.ConfigCache))[request.ConfigurationId];
472
IResultsCache resultsCache = (IResultsCache)_componentHost.GetComponent(
BuildComponentType
.ResultsCache);
473
IConfigCache configCache = (IConfigCache)_componentHost.GetComponent(
BuildComponentType
.ConfigCache);
558
IConfigCache globalConfigurations = (IConfigCache)_componentHost.GetComponent(
BuildComponentType
.ConfigCache);
568
IResultsCache resultsCache = (IResultsCache)_componentHost.GetComponent(
BuildComponentType
.ResultsCache);
642
_configCache = (IConfigCache)host.GetComponent(
BuildComponentType
.ConfigCache);
668
internal static IBuildComponent CreateComponent(
BuildComponentType
type)
670
ErrorUtilities.VerifyThrow(type ==
BuildComponentType
.RequestEngine, "Cannot create component of type {0}", type);
923
_componentHost.GetComponent(
BuildComponentType
.ResultsCache) as IResultsCache;
989
IRequestBuilder builder = (IRequestBuilder)_componentHost.GetComponent(
BuildComponentType
.RequestBuilder);
1166
IConfigCache globalConfigCache = (IConfigCache)_componentHost.GetComponent(
BuildComponentType
.ConfigCache);
1258
IResultsCache resultsCache = (IResultsCache)_componentHost.GetComponent(
BuildComponentType
.ResultsCache);
BackEnd\Components\Caching\ConfigCache.cs (2)
339
internal static IBuildComponent CreateComponent(
BuildComponentType
componentType)
341
ErrorUtilities.VerifyThrow(componentType ==
BuildComponentType
.ConfigCache, "Cannot create components of type {0}", componentType);
BackEnd\Components\Caching\RegisteredTaskObjectCache.cs (2)
58
internal static IBuildComponent CreateComponent(
BuildComponentType
type)
60
ErrorUtilities.VerifyThrow(type ==
BuildComponentType
.RegisteredTaskObjectCache, "Cannot create components of type {0}", type);
BackEnd\Components\Caching\ResultsCache.cs (2)
300
internal static IBuildComponent CreateComponent(
BuildComponentType
componentType)
302
ErrorUtilities.VerifyThrow(componentType ==
BuildComponentType
.ResultsCache, "Cannot create components of type {0}", componentType);
BackEnd\Components\Communications\NodeLauncher.cs (2)
29
public static IBuildComponent CreateComponent(
BuildComponentType
type)
31
ErrorUtilities.VerifyThrowArgumentOutOfRange(type ==
BuildComponentType
.NodeLauncher, nameof(type));
BackEnd\Components\Communications\NodeManager.cs (4)
175
_inProcNodeProvider = _componentHost.GetComponent(
BuildComponentType
.InProcNodeProvider) as INodeProvider;
176
_outOfProcNodeProvider = _componentHost.GetComponent(
BuildComponentType
.OutOfProcNodeProvider) as INodeProvider;
288
internal static IBuildComponent CreateComponent(
BuildComponentType
type)
290
ErrorUtilities.VerifyThrow(type ==
BuildComponentType
.NodeManager, "Cannot create component of type {0}", type);
BackEnd\Components\Communications\NodeProviderInProc.cs (2)
349
internal static IBuildComponent CreateComponent(
BuildComponentType
type)
351
ErrorUtilities.VerifyThrow(type ==
BuildComponentType
.InProcNodeProvider, "Cannot create component of type {0}", type);
BackEnd\Components\Communications\NodeProviderOutOfProc.cs (2)
199
internal static IBuildComponent CreateComponent(
BuildComponentType
componentType)
201
ErrorUtilities.VerifyThrow(componentType ==
BuildComponentType
.OutOfProcNodeProvider, "Factory cannot create components of type {0}", componentType);
BackEnd\Components\Communications\NodeProviderOutOfProcBase.cs (1)
403
INodeLauncher nodeLauncher = (INodeLauncher)_componentHost.GetComponent(
BuildComponentType
.NodeLauncher);
BackEnd\Components\Communications\NodeProviderOutOfProcTaskHost.cs (2)
374
internal static IBuildComponent CreateComponent(
BuildComponentType
componentType)
376
ErrorUtilities.VerifyThrow(componentType ==
BuildComponentType
.OutOfProcTaskHostNodeProvider, "Factory cannot create components of type {0}", componentType);
BackEnd\Components\Communications\TaskHostNodeManager.cs (3)
93
_outOfProcTaskHostNodeProvider = _componentHost.GetComponent(
BuildComponentType
.OutOfProcTaskHostNodeProvider) as INodeProvider;
177
internal static IBuildComponent CreateComponent(
BuildComponentType
type)
179
ErrorUtilities.VerifyThrow(type ==
BuildComponentType
.TaskHostNodeManager, "Cannot create component of type {0}", type);
BackEnd\Components\IBuildComponentHost.cs (4)
17
internal delegate IBuildComponent BuildComponentFactoryDelegate(
BuildComponentType
type);
194
void RegisterFactory(
BuildComponentType
factoryType, BuildComponentFactoryDelegate factory);
201
IBuildComponent GetComponent(
BuildComponentType
type);
209
TComponent GetComponent<TComponent>(
BuildComponentType
type)
BackEnd\Components\Logging\LoggingService.cs (2)
317
_configCache = new Lazy<IConfigCache>(() => (IConfigCache)_componentHost.GetComponent(
BuildComponentType
.ConfigCache), LazyThreadSafetyMode.PublicationOnly);
912
_buildEngineDataRouter = (buildComponentHost.GetComponent(
BuildComponentType
.BuildCheckManagerProvider) as IBuildCheckManagerProvider)?.BuildEngineDataRouter;
BackEnd\Components\Logging\LoggingServiceFactory.cs (2)
47
public IBuildComponent CreateInstance(
BuildComponentType
type)
49
ErrorUtilities.VerifyThrow(type ==
BuildComponentType
.LoggingService, "Cannot create components of type {0}", type);
BackEnd\Components\RequestBuilder\RequestBuilder.cs (6)
216
_targetBuilder = (ITargetBuilder)_componentHost.GetComponent(
BuildComponentType
.TargetBuilder);
631
internal static IBuildComponent CreateComponent(
BuildComponentType
type)
633
ErrorUtilities.VerifyThrow(type ==
BuildComponentType
.RequestBuilder, "Cannot create components of type {0}", type);
1139
: (_componentHost.GetComponent(
BuildComponentType
.BuildCheckManagerProvider) as IBuildCheckManagerProvider)!.Instance;
1280
var resultsCache = (IResultsCache)_componentHost.GetComponent(
BuildComponentType
.ResultsCache);
1315
IResultsCache resultsCache = (IResultsCache)_componentHost.GetComponent(
BuildComponentType
.ResultsCache);
BackEnd\Components\RequestBuilder\TargetBuilder.cs (5)
138
IResultsCache resultsCache = (IResultsCache)_componentHost.GetComponent(
BuildComponentType
.ResultsCache);
170
ITaskBuilder taskBuilder = _componentHost.GetComponent(
BuildComponentType
.TaskBuilder) as ITaskBuilder;
266
ITaskBuilder taskBuilder = _componentHost.GetComponent(
BuildComponentType
.TaskBuilder) as ITaskBuilder;
398
internal static IBuildComponent CreateComponent(
BuildComponentType
type)
400
ErrorUtilities.VerifyThrow(type ==
BuildComponentType
.TargetBuilder, "Cannot create components of type {0}", type);
BackEnd\Components\RequestBuilder\TaskBuilder.cs (2)
241
internal static IBuildComponent CreateComponent(
BuildComponentType
type)
243
ErrorUtilities.VerifyThrow(type ==
BuildComponentType
.TaskBuilder, "Cannot create components of type {0}", type);
BackEnd\Components\RequestBuilder\TaskHost.cs (3)
621
var objectCache = (IRegisteredTaskObjectCache)_host.GetComponent(
BuildComponentType
.RegisteredTaskObjectCache);
630
var objectCache = (IRegisteredTaskObjectCache)_host.GetComponent(
BuildComponentType
.RegisteredTaskObjectCache);
639
var objectCache = (IRegisteredTaskObjectCache)_host.GetComponent(
BuildComponentType
.RegisteredTaskObjectCache);
BackEnd\Components\Scheduler\Scheduler.cs (4)
675
_resultsCache = (IResultsCache)_componentHost.GetComponent(
BuildComponentType
.ResultsCache);
676
_configCache = (IConfigCache)_componentHost.GetComponent(
BuildComponentType
.ConfigCache);
693
internal static IBuildComponent CreateComponent(
BuildComponentType
componentType)
695
ErrorUtilities.VerifyThrow(componentType ==
BuildComponentType
.Scheduler, "Cannot create components of type {0}", componentType);
BackEnd\Components\SdkResolution\MainNodeSdkResolverService.cs (6)
25
/// must have access to an <see cref="IBuildComponentHost"/> and call <see cref="IBuildComponentHost.GetComponent"/> and pass <see cref="
BuildComponentType
.SdkResolverService"/>.
34
public static IBuildComponent CreateComponent(
BuildComponentType
type)
36
ErrorUtilities.VerifyThrowArgumentOutOfRange(type ==
BuildComponentType
.SdkResolverService, nameof(type));
75
ILoggingService loggingService = Host.GetComponent(
BuildComponentType
.LoggingService) as ILoggingService;
83
ILoggingService loggingService = Host.GetComponent(
BuildComponentType
.LoggingService) as ILoggingService;
92
INodeManager nodeManager = Host.GetComponent(
BuildComponentType
.NodeManager) as INodeManager;
BackEnd\Components\SdkResolution\OutOfProcNodeSdkResolverService.cs (1)
25
/// must have access to an <see cref="IBuildComponentHost"/> and call <see cref="IBuildComponentHost.GetComponent"/> and pass <see cref="
BuildComponentType
.SdkResolverService"/>.
BackEnd\Components\SdkResolution\OutOfProcNodeSdkResolverServiceFactory.cs (1)
24
public IBuildComponent CreateInstance(
BuildComponentType
type)
BackEnd\Node\InProcNode.cs (2)
120
IBuildComponent buildRequestEngine = BuildRequestEngine.CreateComponent(
BuildComponentType
.RequestEngine);
339
IRegisteredTaskObjectCache objectCache = (IRegisteredTaskObjectCache)(_componentHost.GetComponent(
BuildComponentType
.RegisteredTaskObjectCache));
BackEnd\Node\OutOfProcNode.cs (13)
155
_buildRequestEngine = (this as IBuildComponentHost).GetComponent(
BuildComponentType
.RequestEngine) as IBuildRequestEngine;
156
_globalConfigCache = (this as IBuildComponentHost).GetComponent(
BuildComponentType
.ConfigCache) as IConfigCache;
157
_taskHostNodeManager = (this as IBuildComponentHost).GetComponent(
BuildComponentType
.TaskHostNodeManager) as INodeManager;
161
((IBuildComponentHost)this).RegisterFactory(
BuildComponentType
.SdkResolverService, sdkResolverServiceFactory.CreateInstance);
162
_sdkResolverService = (this as IBuildComponentHost).GetComponent(
BuildComponentType
.SdkResolverService) as ISdkResolverService;
295
void IBuildComponentHost.RegisterFactory(
BuildComponentType
factoryType, BuildComponentFactoryDelegate factory)
305
IBuildComponent IBuildComponentHost.GetComponent(
BuildComponentType
type)
310
TComponent IBuildComponentHost.GetComponent<TComponent>(
BuildComponentType
type)
481
IRegisteredTaskObjectCache objectCache = (IRegisteredTaskObjectCache)(_componentFactories.GetComponent(
BuildComponentType
.RegisteredTaskObjectCache));
556
if (_componentFactories.GetComponent(
BuildComponentType
.ConfigCache) is IConfigCache configCache)
561
if (_componentFactories.GetComponent(
BuildComponentType
.ResultsCache) is IResultsCache resultsCache)
777
_componentFactories.ReplaceFactory(
BuildComponentType
.LoggingService, loggingServiceFactory.CreateInstance);
779
_loggingService = _componentFactories.GetComponent(
BuildComponentType
.LoggingService) as ILoggingService;
BackEnd\Shared\BuildRequestConfiguration.cs (1)
493
ISdkResolverService sdkResolverService = componentHost.GetComponent(
BuildComponentType
.SdkResolverService) as ISdkResolverService;
BuildCheck\Infrastructure\BuildCheckManagerProvider.cs (2)
34
internal static IBuildComponent CreateComponent(
BuildComponentType
type)
36
ErrorUtilities.VerifyThrow(type ==
BuildComponentType
.BuildCheckManagerProvider, "Cannot create components of type {0}", type);
BuildCheck\Infrastructure\BuildCheckReplayModeConnector.cs (1)
30
.GetComponent(
BuildComponentType
.BuildCheckManagerProvider) as IBuildCheckManagerProvider;
Instance\TaskFactories\TaskHostTask.cs (1)
319
_taskHostProvider = (NodeProviderOutOfProcTaskHost)_buildComponentHost.GetComponent(
BuildComponentType
.OutOfProcTaskHostNodeProvider);
TelemetryInfra\TelemetryCollectorProvider.cs (2)
29
internal static IBuildComponent CreateComponent(
BuildComponentType
type)
31
ErrorUtilities.VerifyThrow(type ==
BuildComponentType
.TelemetryCollector, "Cannot create components of type {0}", type);
Microsoft.Build.Engine.UnitTests (180)
BackEnd\BuildManager_Tests.cs (4)
1922
host.GetComponent(
BuildComponentType
.ConfigCache);
1948
host.GetComponent(
BuildComponentType
.ConfigCache);
1980
host.GetComponent(
BuildComponentType
.ConfigCache);
2032
host.GetComponent(
BuildComponentType
.ConfigCache);
BackEnd\BuildRequestEngine_Tests.cs (5)
287
_engine = (IBuildRequestEngine)_host.GetComponent(
BuildComponentType
.RequestEngine);
288
_cache = (IConfigCache)_host.GetComponent(
BuildComponentType
.ConfigCache);
394
MockRequestBuilder builder = (MockRequestBuilder)_host.GetComponent(
BuildComponentType
.RequestBuilder);
447
MockRequestBuilder builder = (MockRequestBuilder)_host.GetComponent(
BuildComponentType
.RequestBuilder);
513
IBuildRequestEngine engine = (IBuildRequestEngine)_host.GetComponent(
BuildComponentType
.RequestEngine);
BackEnd\LoggingService_Tests.cs (1)
965
ConfigCache configCache = host.GetComponent(
BuildComponentType
.ConfigCache) as ConfigCache;
BackEnd\LoggingServiceFactory_Tests.cs (2)
24
LoggingService loggingService = (LoggingService)factory.CreateInstance(
BuildComponentType
.LoggingService);
35
LoggingService loggingService = (LoggingService)factory.CreateInstance(
BuildComponentType
.LoggingService);
BackEnd\LoggingServicesLogMethod_Tests.cs (5)
838
ConfigCache cache = (ConfigCache)componentHost.GetComponent(
BuildComponentType
.ConfigCache);
864
ConfigCache cache = (ConfigCache)componentHost.GetComponent(
BuildComponentType
.ConfigCache);
903
ConfigCache cache = (ConfigCache)componentHost.GetComponent(
BuildComponentType
.ConfigCache);
944
ConfigCache cache = (ConfigCache)componentHost.GetComponent(
BuildComponentType
.ConfigCache);
1417
ConfigCache cache = (ConfigCache)componentHost.GetComponent(
BuildComponentType
.ConfigCache);
BackEnd\MockHost.cs (12)
198
public IBuildComponent GetComponent(
BuildComponentType
type)
202
BuildComponentType
.ConfigCache => (IBuildComponent)_configCache,
203
BuildComponentType
.LoggingService => (IBuildComponent)_loggingService,
204
BuildComponentType
.RequestEngine => (IBuildComponent)_requestEngine,
205
BuildComponentType
.TargetBuilder => (IBuildComponent)_targetBuilder,
206
BuildComponentType
.ResultsCache => (IBuildComponent)_resultsCache,
207
BuildComponentType
.RequestBuilder => (IBuildComponent)_requestBuilder,
208
BuildComponentType
.SdkResolverService => (IBuildComponent)_sdkResolverService,
209
BuildComponentType
.BuildCheckManagerProvider => (IBuildComponent)_buildCheckManagerProvider,
210
BuildComponentType
.TelemetryCollector => (IBuildComponent)_telemetryCollector,
215
public TComponent GetComponent<TComponent>(
BuildComponentType
type) where TComponent : IBuildComponent
221
public void RegisterFactory(
BuildComponentType
type, BuildComponentFactoryDelegate factory)
BackEnd\NodeEndpointInProc_Tests.cs (3)
78
public IBuildComponent GetComponent(
BuildComponentType
type)
83
public TComponent GetComponent<TComponent>(
BuildComponentType
type) where TComponent : IBuildComponent => throw new NotImplementedException("Not expected to be used.");
85
public void RegisterFactory(
BuildComponentType
type, BuildComponentFactoryDelegate factory)
BackEnd\RequestBuilder_Tests.cs (12)
67
_requestBuilder = (IRequestBuilder)_host.GetComponent(
BuildComponentType
.RequestBuilder);
89
TestTargetBuilder targetBuilder = (TestTargetBuilder)_host.GetComponent(
BuildComponentType
.TargetBuilder);
90
IConfigCache configCache = (IConfigCache)_host.GetComponent(
BuildComponentType
.ConfigCache);
119
TestTargetBuilder targetBuilder = (TestTargetBuilder)_host.GetComponent(
BuildComponentType
.TargetBuilder);
120
IConfigCache configCache = (IConfigCache)_host.GetComponent(
BuildComponentType
.ConfigCache);
152
TestTargetBuilder targetBuilder = (TestTargetBuilder)_host.GetComponent(
BuildComponentType
.TargetBuilder);
153
IConfigCache configCache = (IConfigCache)_host.GetComponent(
BuildComponentType
.ConfigCache);
191
TestTargetBuilder targetBuilder = (TestTargetBuilder)_host.GetComponent(
BuildComponentType
.TargetBuilder);
192
IConfigCache configCache = (IConfigCache)_host.GetComponent(
BuildComponentType
.ConfigCache);
230
TestTargetBuilder targetBuilder = (TestTargetBuilder)_host.GetComponent(
BuildComponentType
.TargetBuilder);
231
IConfigCache configCache = (IConfigCache)_host.GetComponent(
BuildComponentType
.ConfigCache);
306
IConfigCache configCache = (IConfigCache)_host.GetComponent(
BuildComponentType
.ConfigCache);
BackEnd\Scheduler_Tests.cs (7)
72
NodeProviderInProc nodeProviderInProc = ((IBuildComponentHost)BuildManager.DefaultBuildManager).GetComponent(
BuildComponentType
.InProcNodeProvider) as NodeProviderInProc;
99
NodeProviderInProc nodeProviderInProc = ((IBuildComponentHost)_buildManager).GetComponent(
BuildComponentType
.InProcNodeProvider) as NodeProviderInProc;
379
NodeProviderInProc nodeProviderInProc = ((IBuildComponentHost)BuildManager.DefaultBuildManager).GetComponent(
BuildComponentType
.InProcNodeProvider) as NodeProviderInProc;
573
NodeProviderInProc nodeProviderInProc = ((IBuildComponentHost)BuildManager.DefaultBuildManager).GetComponent(
BuildComponentType
.InProcNodeProvider) as NodeProviderInProc;
617
Assert.Null(((ResultsCacheWithOverride)_host.GetComponent(
BuildComponentType
.ResultsCache)).CurrentCache.GetResultsForConfiguration(1));
742
(_host.GetComponent(
BuildComponentType
.ConfigCache) as IConfigCache).AddConfiguration(config);
765
(_host.GetComponent(
BuildComponentType
.ResultsCache) as IResultsCache).AddResult(result);
BackEnd\SdkResultOutOfProc_Tests.cs (1)
259
((IBuildComponentHost)_buildManager).RegisterFactory(
BuildComponentType
.SdkResolverService, type =>
BackEnd\TargetBuilder_Tests.cs (90)
106
TargetBuilder builder = (TargetBuilder)_host.GetComponent(
BuildComponentType
.TargetBuilder);
107
IConfigCache cache = (IConfigCache)_host.GetComponent(
BuildComponentType
.ConfigCache);
126
TargetBuilder builder = (TargetBuilder)_host.GetComponent(
BuildComponentType
.TargetBuilder);
127
IConfigCache cache = (IConfigCache)_host.GetComponent(
BuildComponentType
.ConfigCache);
139
IResultsCache resultsCache = (IResultsCache)_host.GetComponent(
BuildComponentType
.ResultsCache);
153
TargetBuilder builder = (TargetBuilder)_host.GetComponent(
BuildComponentType
.TargetBuilder);
154
IConfigCache cache = (IConfigCache)_host.GetComponent(
BuildComponentType
.ConfigCache);
162
IResultsCache resultsCache = (IResultsCache)_host.GetComponent(
BuildComponentType
.ResultsCache);
179
TargetBuilder builder = (TargetBuilder)_host.GetComponent(
BuildComponentType
.TargetBuilder);
180
MockTaskBuilder taskBuilder = (MockTaskBuilder)_host.GetComponent(
BuildComponentType
.TaskBuilder);
183
IConfigCache cache = (IConfigCache)_host.GetComponent(
BuildComponentType
.ConfigCache);
195
IResultsCache resultsCache = (IResultsCache)_host.GetComponent(
BuildComponentType
.ResultsCache);
367
TargetBuilder builder = (TargetBuilder)_host.GetComponent(
BuildComponentType
.TargetBuilder);
368
IConfigCache cache = (IConfigCache)_host.GetComponent(
BuildComponentType
.ConfigCache);
507
TargetBuilder builder = (TargetBuilder)_host.GetComponent(
BuildComponentType
.TargetBuilder);
508
IConfigCache cache = (IConfigCache)_host.GetComponent(
BuildComponentType
.ConfigCache);
533
TargetBuilder builder = (TargetBuilder)_host.GetComponent(
BuildComponentType
.TargetBuilder);
534
IConfigCache cache = (IConfigCache)_host.GetComponent(
BuildComponentType
.ConfigCache);
559
TargetBuilder builder = (TargetBuilder)_host.GetComponent(
BuildComponentType
.TargetBuilder);
560
IConfigCache cache = (IConfigCache)_host.GetComponent(
BuildComponentType
.ConfigCache);
584
MockTaskBuilder taskBuilder = (MockTaskBuilder)_host.GetComponent(
BuildComponentType
.TaskBuilder);
589
TargetBuilder builder = (TargetBuilder)_host.GetComponent(
BuildComponentType
.TargetBuilder);
590
IConfigCache cache = (IConfigCache)_host.GetComponent(
BuildComponentType
.ConfigCache);
619
MockTaskBuilder taskBuilder = (MockTaskBuilder)_host.GetComponent(
BuildComponentType
.TaskBuilder);
624
TargetBuilder builder = (TargetBuilder)_host.GetComponent(
BuildComponentType
.TargetBuilder);
625
IConfigCache cache = (IConfigCache)_host.GetComponent(
BuildComponentType
.ConfigCache);
656
TargetBuilder builder = (TargetBuilder)_host.GetComponent(
BuildComponentType
.TargetBuilder);
657
IConfigCache cache = (IConfigCache)_host.GetComponent(
BuildComponentType
.ConfigCache);
687
TargetBuilder builder = (TargetBuilder)_host.GetComponent(
BuildComponentType
.TargetBuilder);
688
IConfigCache cache = (IConfigCache)_host.GetComponent(
BuildComponentType
.ConfigCache);
713
TargetBuilder builder = (TargetBuilder)_host.GetComponent(
BuildComponentType
.TargetBuilder);
714
IConfigCache cache = (IConfigCache)_host.GetComponent(
BuildComponentType
.ConfigCache);
749
TargetBuilder builder = (TargetBuilder)_host.GetComponent(
BuildComponentType
.TargetBuilder);
750
IConfigCache cache = (IConfigCache)_host.GetComponent(
BuildComponentType
.ConfigCache);
775
TargetBuilder builder = (TargetBuilder)_host.GetComponent(
BuildComponentType
.TargetBuilder);
776
IConfigCache cache = (IConfigCache)_host.GetComponent(
BuildComponentType
.ConfigCache);
802
TargetBuilder builder = (TargetBuilder)_host.GetComponent(
BuildComponentType
.TargetBuilder);
803
IConfigCache cache = (IConfigCache)_host.GetComponent(
BuildComponentType
.ConfigCache);
827
MockTaskBuilder taskBuilder = (MockTaskBuilder)_host.GetComponent(
BuildComponentType
.TaskBuilder);
832
TargetBuilder builder = (TargetBuilder)_host.GetComponent(
BuildComponentType
.TargetBuilder);
833
IConfigCache cache = (IConfigCache)_host.GetComponent(
BuildComponentType
.ConfigCache);
871
MockTaskBuilder taskBuilder = (MockTaskBuilder)_host.GetComponent(
BuildComponentType
.TaskBuilder);
876
TargetBuilder builder = (TargetBuilder)_host.GetComponent(
BuildComponentType
.TargetBuilder);
877
IConfigCache cache = (IConfigCache)_host.GetComponent(
BuildComponentType
.ConfigCache);
903
TargetBuilder builder = (TargetBuilder)_host.GetComponent(
BuildComponentType
.TargetBuilder);
904
IConfigCache cache = (IConfigCache)_host.GetComponent(
BuildComponentType
.ConfigCache);
930
TargetBuilder builder = (TargetBuilder)_host.GetComponent(
BuildComponentType
.TargetBuilder);
931
IConfigCache cache = (IConfigCache)_host.GetComponent(
BuildComponentType
.ConfigCache);
962
TargetBuilder builder = (TargetBuilder)_host.GetComponent(
BuildComponentType
.TargetBuilder);
963
IConfigCache cache = (IConfigCache)_host.GetComponent(
BuildComponentType
.ConfigCache);
1060
TargetBuilder builder = (TargetBuilder)_host.GetComponent(
BuildComponentType
.TargetBuilder);
1061
IConfigCache cache = (IConfigCache)_host.GetComponent(
BuildComponentType
.ConfigCache);
1095
TargetBuilder builder = (TargetBuilder)_host.GetComponent(
BuildComponentType
.TargetBuilder);
1096
IConfigCache cache = (IConfigCache)_host.GetComponent(
BuildComponentType
.ConfigCache);
1146
TargetBuilder builder = (TargetBuilder)_host.GetComponent(
BuildComponentType
.TargetBuilder);
1147
IConfigCache cache = (IConfigCache)_host.GetComponent(
BuildComponentType
.ConfigCache);
1206
TargetBuilder builder = (TargetBuilder)_host.GetComponent(
BuildComponentType
.TargetBuilder);
1207
IConfigCache cache = (IConfigCache)_host.GetComponent(
BuildComponentType
.ConfigCache);
1243
MockTaskBuilder taskBuilder = (MockTaskBuilder)_host.GetComponent(
BuildComponentType
.TaskBuilder);
1248
TargetBuilder builder = (TargetBuilder)_host.GetComponent(
BuildComponentType
.TargetBuilder);
1249
IConfigCache cache = (IConfigCache)_host.GetComponent(
BuildComponentType
.ConfigCache);
1294
TargetBuilder builder = (TargetBuilder)_host.GetComponent(
BuildComponentType
.TargetBuilder);
1295
IConfigCache cache = (IConfigCache)_host.GetComponent(
BuildComponentType
.ConfigCache);
1325
TargetBuilder builder = (TargetBuilder)_host.GetComponent(
BuildComponentType
.TargetBuilder);
1326
IConfigCache cache = (IConfigCache)_host.GetComponent(
BuildComponentType
.ConfigCache);
1399
TargetBuilder builder = (TargetBuilder)_host.GetComponent(
BuildComponentType
.TargetBuilder);
1400
IConfigCache cache = (IConfigCache)_host.GetComponent(
BuildComponentType
.ConfigCache);
1428
TargetBuilder builder = (TargetBuilder)_host.GetComponent(
BuildComponentType
.TargetBuilder);
1429
MockTaskBuilder taskBuilder = (MockTaskBuilder)_host.GetComponent(
BuildComponentType
.TaskBuilder);
1433
IConfigCache cache = (IConfigCache)_host.GetComponent(
BuildComponentType
.ConfigCache);
1439
IResultsCache resultsCache = (IResultsCache)_host.GetComponent(
BuildComponentType
.ResultsCache);
1456
TargetBuilder builder = (TargetBuilder)_host.GetComponent(
BuildComponentType
.TargetBuilder);
1457
MockTaskBuilder taskBuilder = (MockTaskBuilder)_host.GetComponent(
BuildComponentType
.TaskBuilder);
1460
IConfigCache cache = (IConfigCache)_host.GetComponent(
BuildComponentType
.ConfigCache);
1465
IResultsCache resultsCache = (IResultsCache)_host.GetComponent(
BuildComponentType
.ResultsCache);
1549
MockTaskBuilder mockBuilder = (MockTaskBuilder)_host.GetComponent(
BuildComponentType
.TaskBuilder);
1679
IConfigCache cache = (IConfigCache)_host.GetComponent(
BuildComponentType
.ConfigCache);
1711
MockTaskBuilder taskBuilder = (MockTaskBuilder)_host.GetComponent(
BuildComponentType
.TaskBuilder);
1714
TargetBuilder builder = (TargetBuilder)_host.GetComponent(
BuildComponentType
.TargetBuilder);
1715
IConfigCache cache = (IConfigCache)_host.GetComponent(
BuildComponentType
.ConfigCache);
1849
public IBuildComponent GetComponent(
BuildComponentType
type)
1853
BuildComponentType
.ConfigCache => (IBuildComponent)_configCache,
1854
BuildComponentType
.LoggingService => (IBuildComponent)_loggingService,
1855
BuildComponentType
.ResultsCache => (IBuildComponent)_resultsCache,
1856
BuildComponentType
.RequestBuilder => (IBuildComponent)_requestBuilder,
1857
BuildComponentType
.TaskBuilder => (IBuildComponent)_taskBuilder,
1858
BuildComponentType
.TargetBuilder => (IBuildComponent)_targetBuilder,
1859
BuildComponentType
.SdkResolverService => (IBuildComponent)_sdkResolverService,
1864
public TComponent GetComponent<TComponent>(
BuildComponentType
type) where TComponent : IBuildComponent
1870
public void RegisterFactory(
BuildComponentType
type, BuildComponentFactoryDelegate factory)
BackEnd\TargetEntry_Tests.cs (24)
211
MockTaskBuilder taskBuilder = (MockTaskBuilder)_host.GetComponent(
BuildComponentType
.TaskBuilder);
253
MockTaskBuilder taskBuilder = (MockTaskBuilder)_host.GetComponent(
BuildComponentType
.TaskBuilder);
318
MockTaskBuilder taskBuilder = (MockTaskBuilder)_host.GetComponent(
BuildComponentType
.TaskBuilder);
347
MockTaskBuilder taskBuilder = (MockTaskBuilder)_host.GetComponent(
BuildComponentType
.TaskBuilder);
453
MockTaskBuilder taskBuilder = (MockTaskBuilder)_host.GetComponent(
BuildComponentType
.TaskBuilder);
479
MockTaskBuilder taskBuilder = (MockTaskBuilder)_host.GetComponent(
BuildComponentType
.TaskBuilder);
497
MockTaskBuilder taskBuilder = (MockTaskBuilder)_host.GetComponent(
BuildComponentType
.TaskBuilder);
516
MockTaskBuilder taskBuilder = (MockTaskBuilder)_host.GetComponent(
BuildComponentType
.TaskBuilder);
534
MockTaskBuilder taskBuilder = (MockTaskBuilder)_host.GetComponent(
BuildComponentType
.TaskBuilder);
552
MockTaskBuilder taskBuilder = (MockTaskBuilder)_host.GetComponent(
BuildComponentType
.TaskBuilder);
570
MockTaskBuilder taskBuilder = (MockTaskBuilder)_host.GetComponent(
BuildComponentType
.TaskBuilder);
588
MockTaskBuilder taskBuilder = (MockTaskBuilder)_host.GetComponent(
BuildComponentType
.TaskBuilder);
730
NodeProviderInProc nodeProviderInProc = ((IBuildComponentHost)BuildManager.DefaultBuildManager).GetComponent(
BuildComponentType
.InProcNodeProvider) as NodeProviderInProc;
789
NodeProviderInProc inProcNodeProvider = ((IBuildComponentHost)manager).GetComponent(
BuildComponentType
.InProcNodeProvider) as NodeProviderInProc;
898
ITaskBuilder taskBuilder = _host.GetComponent(
BuildComponentType
.TaskBuilder) as ITaskBuilder;
1211
public IBuildComponent GetComponent(
BuildComponentType
type)
1215
BuildComponentType
.ConfigCache => (IBuildComponent)_configCache,
1216
BuildComponentType
.LoggingService => (IBuildComponent)_loggingService,
1217
BuildComponentType
.ResultsCache => (IBuildComponent)_resultsCache,
1218
BuildComponentType
.RequestBuilder => (IBuildComponent)_requestBuilder,
1219
BuildComponentType
.TaskBuilder => (IBuildComponent)_taskBuilder,
1220
BuildComponentType
.SdkResolverService => (IBuildComponent)_sdkResolverService,
1225
public TComponent GetComponent<TComponent>(
BuildComponentType
type) where TComponent : IBuildComponent
1231
public void RegisterFactory(
BuildComponentType
type, BuildComponentFactoryDelegate factory)
BackEnd\TaskBuilder_Tests.cs (9)
1229
public IBuildComponent GetComponent(
BuildComponentType
type)
1233
BuildComponentType
.ConfigCache => (IBuildComponent)_configCache,
1234
BuildComponentType
.LoggingService => (IBuildComponent)_loggingService,
1235
BuildComponentType
.ResultsCache => (IBuildComponent)_resultsCache,
1236
BuildComponentType
.RequestBuilder => (IBuildComponent)_requestBuilder,
1237
BuildComponentType
.TargetBuilder => (IBuildComponent)_targetBuilder,
1238
BuildComponentType
.SdkResolverService => (IBuildComponent)_sdkResolverService,
1243
public TComponent GetComponent<TComponent>(
BuildComponentType
type) where TComponent : IBuildComponent
1249
public void RegisterFactory(
BuildComponentType
type, BuildComponentFactoryDelegate factory)
BackEnd\TaskHost_Tests.cs (1)
71
_loggingService = loggingFactory.CreateInstance(
BuildComponentType
.LoggingService) as LoggingService;
Construction\SolutionProjectGenerator_Tests.cs (4)
2189
NodeProviderInProc nodeProviderInProc = ((IBuildComponentHost)BuildManager.DefaultBuildManager).GetComponent(
BuildComponentType
.InProcNodeProvider) as NodeProviderInProc;
2216
NodeProviderInProc nodeProviderInProc = ((IBuildComponentHost)buildManager).GetComponent(
BuildComponentType
.InProcNodeProvider) as NodeProviderInProc;
2277
NodeProviderInProc nodeProviderInProc = ((IBuildComponentHost)BuildManager.DefaultBuildManager).GetComponent(
BuildComponentType
.InProcNodeProvider) as NodeProviderInProc;
2304
NodeProviderInProc nodeProviderInProc = ((IBuildComponentHost)buildManager).GetComponent(
BuildComponentType
.InProcNodeProvider) as NodeProviderInProc;