170 references to BuildComponentType
Microsoft.Build (170)
BackEnd\BuildManager\BuildManager.cs (25)
378
private ISdkResolverService SdkResolverService => ((this as IBuildComponentHost).GetComponent(
BuildComponentType
.SdkResolverService) as ISdkResolverService)!;
384
ILoggingService IBuildComponentHost.LoggingService => _componentFactories.GetComponent<ILoggingService>(
BuildComponentType
.LoggingService);
644
NodeLauncher nodeLauncher = ((IBuildComponentHost)this).GetComponent<NodeLauncher>(
BuildComponentType
.NodeLauncher);
664
_nodeManager = ((IBuildComponentHost)this).GetComponent(
BuildComponentType
.NodeManager) as INodeManager;
728
_taskHostNodeManager = ((IBuildComponentHost)this).GetComponent<INodeManager>(
BuildComponentType
.TaskHostNodeManager);
729
_scheduler = ((IBuildComponentHost)this).GetComponent<IScheduler>(
BuildComponentType
.Scheduler);
820
_configCache = ((IBuildComponentHost)this).GetComponent<IConfigCache>(
BuildComponentType
.ConfigCache);
821
_resultsCache = ((IBuildComponentHost)this).GetComponent<IResultsCache>(
BuildComponentType
.ResultsCache);
978
_configCache = ((IBuildComponentHost)this).GetComponent<IConfigCache>(
BuildComponentType
.ConfigCache);
979
_resultsCache = ((IBuildComponentHost)this).GetComponent<IResultsCache>(
BuildComponentType
.ResultsCache);
999
_configCache = ((IBuildComponentHost)this).GetComponent(
BuildComponentType
.ConfigCache) as IConfigCache;
1515
_nodeManager ??= (INodeManager)((IBuildComponentHost)this).GetComponent(
BuildComponentType
.NodeManager);
1564
void IBuildComponentHost.RegisterFactory(
BuildComponentType
componentType, BuildComponentFactoryDelegate factory)
1574
IBuildComponent IBuildComponentHost.GetComponent(
BuildComponentType
type)
1579
TComponent IBuildComponentHost.GetComponent<TComponent>(
BuildComponentType
type)
2866
ILoggingService loggingService = ((IBuildComponentHost)this).GetComponent<ILoggingService>(
BuildComponentType
.LoggingService);
2879
ILoggingService loggingService = ((IBuildComponentHost)this).GetComponent<ILoggingService>(
BuildComponentType
.LoggingService);
3053
IConfigCache configCache = _componentFactories.GetComponent<IConfigCache>(
BuildComponentType
.ConfigCache);
3154
ILoggingService loggingService = ((IBuildComponentHost)this).GetComponent<ILoggingService>(
BuildComponentType
.LoggingService);
3306
_componentFactories.ReplaceFactory(
BuildComponentType
.LoggingService, loggingService as IBuildComponent);
3319
((IBuildComponentHost)this).GetComponent(
BuildComponentType
.BuildCheckManagerProvider) as IBuildCheckManagerProvider;
3531
_componentFactories.ShutdownComponent(
BuildComponentType
.LoggingService);
3538
_componentFactories.ReplaceFactory(
BuildComponentType
.LoggingService, (IBuildComponent?)null);
3642
_componentFactories.ReplaceFactory(
BuildComponentType
.ConfigCache, new ConfigCacheWithOverride(cacheAggregation.ConfigCache));
3643
_componentFactories.ReplaceFactory(
BuildComponentType
.ResultsCache, new ResultsCacheWithOverride(cacheAggregation.ResultsCache));
BackEnd\Components\BuildComponentFactoryCollection.cs (48)
25
private readonly Dictionary<
BuildComponentType
, BuildComponentEntry> _componentEntriesByType;
38
_componentEntriesByType = new Dictionary<
BuildComponentType
, BuildComponentEntry>();
62
_componentEntriesByType[
BuildComponentType
.Scheduler] = new BuildComponentEntry(
BuildComponentType
.Scheduler, Scheduler.CreateComponent, CreationPattern.Singleton);
63
_componentEntriesByType[
BuildComponentType
.ConfigCache] = new BuildComponentEntry(
BuildComponentType
.ConfigCache, ConfigCache.CreateComponent, CreationPattern.Singleton);
64
_componentEntriesByType[
BuildComponentType
.ResultsCache] = new BuildComponentEntry(
BuildComponentType
.ResultsCache, ResultsCache.CreateComponent, CreationPattern.Singleton);
65
_componentEntriesByType[
BuildComponentType
.NodeManager] = new BuildComponentEntry(
BuildComponentType
.NodeManager, NodeManager.CreateComponent, CreationPattern.Singleton);
66
_componentEntriesByType[
BuildComponentType
.TaskHostNodeManager] = new BuildComponentEntry(
BuildComponentType
.TaskHostNodeManager, TaskHostNodeManager.CreateComponent, CreationPattern.Singleton);
68
_componentEntriesByType[
BuildComponentType
.NodeLauncher] = new BuildComponentEntry(
BuildComponentType
.NodeLauncher, NodeLauncher.CreateComponent, CreationPattern.Singleton);
69
_componentEntriesByType[
BuildComponentType
.InProcNodeProvider] = new BuildComponentEntry(
BuildComponentType
.InProcNodeProvider, NodeProviderInProc.CreateComponent, CreationPattern.Singleton);
70
_componentEntriesByType[
BuildComponentType
.OutOfProcNodeProvider] = new BuildComponentEntry(
BuildComponentType
.OutOfProcNodeProvider, NodeProviderOutOfProc.CreateComponent, CreationPattern.Singleton);
71
_componentEntriesByType[
BuildComponentType
.OutOfProcTaskHostNodeProvider] = new BuildComponentEntry(
BuildComponentType
.OutOfProcTaskHostNodeProvider, NodeProviderOutOfProcTaskHost.CreateComponent, CreationPattern.Singleton);
76
_componentEntriesByType[
BuildComponentType
.RequestEngine] = new BuildComponentEntry(
BuildComponentType
.RequestEngine, BuildRequestEngine.CreateComponent, CreationPattern.Singleton);
80
_componentEntriesByType[
BuildComponentType
.LoggingService] = new BuildComponentEntry(
BuildComponentType
.LoggingService, null);
81
_componentEntriesByType[
BuildComponentType
.RequestBuilder] = new BuildComponentEntry(
BuildComponentType
.RequestBuilder, RequestBuilder.CreateComponent, CreationPattern.CreateAlways);
83
_componentEntriesByType[
BuildComponentType
.BuildCheckManagerProvider] = new BuildComponentEntry(
BuildComponentType
.BuildCheckManagerProvider, BuildCheckManagerProvider.CreateComponent, CreationPattern.Singleton);
84
_componentEntriesByType[
BuildComponentType
.TelemetryCollector] = new BuildComponentEntry(
BuildComponentType
.TelemetryCollector, TelemetryCollectorProvider.CreateComponent, CreationPattern.Singleton);
85
_componentEntriesByType[
BuildComponentType
.TargetBuilder] = new BuildComponentEntry(
BuildComponentType
.TargetBuilder, TargetBuilder.CreateComponent, CreationPattern.CreateAlways);
86
_componentEntriesByType[
BuildComponentType
.TaskBuilder] = new BuildComponentEntry(
BuildComponentType
.TaskBuilder, TaskBuilder.CreateComponent, CreationPattern.CreateAlways);
87
_componentEntriesByType[
BuildComponentType
.RegisteredTaskObjectCache] = new BuildComponentEntry(
BuildComponentType
.RegisteredTaskObjectCache, RegisteredTaskObjectCache.CreateComponent, CreationPattern.Singleton);
90
_componentEntriesByType[
BuildComponentType
.SdkResolverService] = new BuildComponentEntry(
BuildComponentType
.SdkResolverService, MainNodeSdkResolverService.CreateComponent, CreationPattern.Singleton);
102
foreach (KeyValuePair<
BuildComponentType
, BuildComponentEntry> componentEntry in _componentEntriesByType)
114
public void ShutdownComponent(
BuildComponentType
componentType)
125
public void ReplaceFactory(
BuildComponentType
componentType, BuildComponentFactoryDelegate factory)
136
public void ReplaceFactory(
BuildComponentType
componentType, IBuildComponent instance)
148
public void AddFactory(
BuildComponentType
componentType, BuildComponentFactoryDelegate factory, CreationPattern creationPattern)
158
public IBuildComponent GetComponent(
BuildComponentType
type)
165
internal TComponent GetComponent<TComponent>(
BuildComponentType
type) where TComponent : IBuildComponent
188
public BuildComponentEntry(
BuildComponentType
type, BuildComponentFactoryDelegate factory, CreationPattern pattern)
198
public BuildComponentEntry(
BuildComponentType
type, IBuildComponent singleton)
208
private
BuildComponentType
ComponentType { get; }
BackEnd\Components\BuildRequestEngine\BuildRequestEngine.cs (14)
228
var telemetryProvider = (TelemetryCollectorProvider)_componentHost.GetComponent(
BuildComponentType
.TelemetryCollector);
322
IBuildCheckManagerProvider buildCheckProvider = (_componentHost.GetComponent(
BuildComponentType
.BuildCheckManagerProvider) as IBuildCheckManagerProvider);
380
IResultsCache cache = (IResultsCache)_componentHost.GetComponent(
BuildComponentType
.ResultsCache);
383
BuildRequestConfiguration config = ((IConfigCache)_componentHost.GetComponent(
BuildComponentType
.ConfigCache))[request.ConfigurationId];
488
IResultsCache resultsCache = (IResultsCache)_componentHost.GetComponent(
BuildComponentType
.ResultsCache);
489
IConfigCache configCache = (IConfigCache)_componentHost.GetComponent(
BuildComponentType
.ConfigCache);
574
IConfigCache globalConfigurations = (IConfigCache)_componentHost.GetComponent(
BuildComponentType
.ConfigCache);
584
IResultsCache resultsCache = (IResultsCache)_componentHost.GetComponent(
BuildComponentType
.ResultsCache);
659
_configCache = (IConfigCache)host.GetComponent(
BuildComponentType
.ConfigCache);
685
internal static IBuildComponent CreateComponent(
BuildComponentType
type)
687
Assumed.Equal(type,
BuildComponentType
.RequestEngine, $"Cannot create component of type {type}");
1009
IRequestBuilder builder = (IRequestBuilder)_componentHost.GetComponent(
BuildComponentType
.RequestBuilder);
1186
IConfigCache globalConfigCache = (IConfigCache)_componentHost.GetComponent(
BuildComponentType
.ConfigCache);
1273
IResultsCache resultsCache = (IResultsCache)_componentHost.GetComponent(
BuildComponentType
.ResultsCache);
BackEnd\Components\Caching\ConfigCache.cs (2)
335
internal static IBuildComponent CreateComponent(
BuildComponentType
componentType)
337
Assumed.Equal(componentType,
BuildComponentType
.ConfigCache, $"Cannot create components of type {componentType}");
BackEnd\Components\Caching\RegisteredTaskObjectCache.cs (2)
57
internal static IBuildComponent CreateComponent(
BuildComponentType
type)
59
Assumed.Equal(type,
BuildComponentType
.RegisteredTaskObjectCache, $"Cannot create components of type {type}");
BackEnd\Components\Caching\ResultsCache.cs (2)
317
internal static IBuildComponent CreateComponent(
BuildComponentType
componentType)
319
Assumed.Equal(componentType,
BuildComponentType
.ResultsCache, $"Cannot create components of type {componentType}");
BackEnd\Components\Communications\NodeLauncher.cs (2)
33
public static IBuildComponent CreateComponent(
BuildComponentType
type)
35
ArgumentOutOfRangeException.ThrowIfNotEqual(type,
BuildComponentType
.NodeLauncher);
BackEnd\Components\Communications\NodeManager.cs (4)
169
_inProcNodeProvider = _componentHost.GetComponent(
BuildComponentType
.InProcNodeProvider) as INodeProvider;
170
_outOfProcNodeProvider = _componentHost.GetComponent(
BuildComponentType
.OutOfProcNodeProvider) as INodeProvider;
282
internal static IBuildComponent CreateComponent(
BuildComponentType
type)
284
Assumed.Equal(type,
BuildComponentType
.NodeManager, $"Cannot create component of type {type}");
BackEnd\Components\Communications\NodeProviderInProc.cs (2)
335
internal static IBuildComponent CreateComponent(
BuildComponentType
type)
337
Assumed.Equal(type,
BuildComponentType
.InProcNodeProvider, $"Cannot create component of type {type}");
BackEnd\Components\Communications\NodeProviderOutOfProc.cs (2)
198
internal static IBuildComponent CreateComponent(
BuildComponentType
componentType)
200
Assumed.Equal(componentType,
BuildComponentType
.OutOfProcNodeProvider, $"Factory cannot create components of type {componentType}");
BackEnd\Components\Communications\NodeProviderOutOfProcBase.cs (1)
396
INodeLauncher nodeLauncher = (INodeLauncher)_componentHost.GetComponent(
BuildComponentType
.NodeLauncher);
BackEnd\Components\Communications\NodeProviderOutOfProcTaskHost.cs (4)
561
internal static IBuildComponent CreateComponent(
BuildComponentType
componentType)
563
Assumed.Equal(componentType,
BuildComponentType
.OutOfProcTaskHostNodeProvider, $"Factory cannot create components of type {componentType}");
579
internal static IBuildComponent CreateProcessWideComponent(
BuildComponentType
componentType)
581
Assumed.Equal(componentType,
BuildComponentType
.OutOfProcTaskHostNodeProvider, $"Factory cannot create components of type {componentType}");
BackEnd\Components\Communications\TaskHostNodeManager.cs (3)
92
_outOfProcTaskHostNodeProvider = _componentHost.GetComponent(
BuildComponentType
.OutOfProcTaskHostNodeProvider) as INodeProvider;
176
internal static IBuildComponent CreateComponent(
BuildComponentType
type)
178
Assumed.Equal(type,
BuildComponentType
.TaskHostNodeManager, $"Cannot create component of type {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)
324
_configCache = new Lazy<IConfigCache>(() => (IConfigCache)_componentHost.GetComponent(
BuildComponentType
.ConfigCache), LazyThreadSafetyMode.PublicationOnly);
909
_buildEngineDataRouter = (buildComponentHost.GetComponent(
BuildComponentType
.BuildCheckManagerProvider) as IBuildCheckManagerProvider)?.BuildEngineDataRouter;
BackEnd\Components\Logging\LoggingServiceFactory.cs (2)
46
public IBuildComponent CreateInstance(
BuildComponentType
type)
48
Assumed.Equal(type,
BuildComponentType
.LoggingService, $"Cannot create components of type {type}");
BackEnd\Components\RequestBuilder\RequestBuilder.cs (6)
216
_targetBuilder = (ITargetBuilder)_componentHost.GetComponent(
BuildComponentType
.TargetBuilder);
632
internal static IBuildComponent CreateComponent(
BuildComponentType
type)
634
Assumed.Equal(type,
BuildComponentType
.RequestBuilder, $"Cannot create components of type {type}");
1151
: (_componentHost.GetComponent(
BuildComponentType
.BuildCheckManagerProvider) as IBuildCheckManagerProvider)!.Instance;
1290
var resultsCache = (IResultsCache)_componentHost.GetComponent(
BuildComponentType
.ResultsCache);
1347
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;
395
internal static IBuildComponent CreateComponent(
BuildComponentType
type)
397
Assumed.Equal(type,
BuildComponentType
.TargetBuilder, $"Cannot create components of type {type}");
BackEnd\Components\RequestBuilder\TaskBuilder.cs (2)
237
internal static IBuildComponent CreateComponent(
BuildComponentType
type)
239
Assumed.Equal(type,
BuildComponentType
.TaskBuilder, $"Cannot create components of type {type}");
BackEnd\Components\RequestBuilder\TaskHost.cs (3)
657
var objectCache = (IRegisteredTaskObjectCache)_host.GetComponent(
BuildComponentType
.RegisteredTaskObjectCache);
666
var objectCache = (IRegisteredTaskObjectCache)_host.GetComponent(
BuildComponentType
.RegisteredTaskObjectCache);
675
var objectCache = (IRegisteredTaskObjectCache)_host.GetComponent(
BuildComponentType
.RegisteredTaskObjectCache);
BackEnd\Components\Scheduler\Scheduler.cs (4)
690
_resultsCache = (IResultsCache)_componentHost.GetComponent(
BuildComponentType
.ResultsCache);
691
_configCache = (IConfigCache)_componentHost.GetComponent(
BuildComponentType
.ConfigCache);
708
internal static IBuildComponent CreateComponent(
BuildComponentType
componentType)
710
Assumed.Equal(componentType,
BuildComponentType
.Scheduler, $"Cannot create components of type {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
ArgumentOutOfRangeException.ThrowIfNotEqual(type,
BuildComponentType
.SdkResolverService);
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);
334
IRegisteredTaskObjectCache objectCache = (IRegisteredTaskObjectCache)(_componentHost.GetComponent(
BuildComponentType
.RegisteredTaskObjectCache));
BackEnd\Node\OutOfProcNode.cs (14)
164
_componentFactories.ReplaceFactory(
BuildComponentType
.OutOfProcTaskHostNodeProvider, NodeProviderOutOfProcTaskHost.CreateProcessWideComponent);
169
_buildRequestEngine = (this as IBuildComponentHost).GetComponent(
BuildComponentType
.RequestEngine) as IBuildRequestEngine;
170
_globalConfigCache = (this as IBuildComponentHost).GetComponent(
BuildComponentType
.ConfigCache) as IConfigCache;
171
_taskHostNodeManager = (this as IBuildComponentHost).GetComponent(
BuildComponentType
.TaskHostNodeManager) as INodeManager;
175
((IBuildComponentHost)this).RegisterFactory(
BuildComponentType
.SdkResolverService, sdkResolverServiceFactory.CreateInstance);
176
_sdkResolverService = (this as IBuildComponentHost).GetComponent(
BuildComponentType
.SdkResolverService) as ISdkResolverService;
309
void IBuildComponentHost.RegisterFactory(
BuildComponentType
factoryType, BuildComponentFactoryDelegate factory)
319
IBuildComponent IBuildComponentHost.GetComponent(
BuildComponentType
type)
324
TComponent IBuildComponentHost.GetComponent<TComponent>(
BuildComponentType
type)
495
IRegisteredTaskObjectCache objectCache = (IRegisteredTaskObjectCache)(_componentFactories.GetComponent(
BuildComponentType
.RegisteredTaskObjectCache));
570
if (_componentFactories.GetComponent(
BuildComponentType
.ConfigCache) is IConfigCache configCache)
575
if (_componentFactories.GetComponent(
BuildComponentType
.ResultsCache) is IResultsCache resultsCache)
796
_componentFactories.ReplaceFactory(
BuildComponentType
.LoggingService, loggingServiceFactory.CreateInstance);
798
_loggingService = _componentFactories.GetComponent(
BuildComponentType
.LoggingService) as ILoggingService;
BackEnd\Shared\BuildRequestConfiguration.cs (1)
557
ISdkResolverService sdkResolverService = componentHost.GetComponent(
BuildComponentType
.SdkResolverService) as ISdkResolverService;
BuildCheck\Infrastructure\BuildCheckManagerProvider.cs (2)
35
internal static IBuildComponent CreateComponent(
BuildComponentType
type)
37
Assumed.Equal(type,
BuildComponentType
.BuildCheckManagerProvider, $"Cannot create components of type {type}");
BuildCheck\Infrastructure\BuildCheckReplayModeConnector.cs (1)
30
.GetComponent(
BuildComponentType
.BuildCheckManagerProvider) as IBuildCheckManagerProvider;
Instance\TaskFactories\TaskHostTask.cs (1)
317
_taskHostProvider = (NodeProviderOutOfProcTaskHost)_buildComponentHost.GetComponent(
BuildComponentType
.OutOfProcTaskHostNodeProvider);
TelemetryInfra\TelemetryCollectorProvider.cs (2)
28
internal static IBuildComponent CreateComponent(
BuildComponentType
type)
30
Assumed.Equal(type,
BuildComponentType
.TelemetryCollector, $"Cannot create components of type {type}");