350 references to BuildComponentType
Microsoft.Build (169)
BackEnd\BuildManager\BuildManager.cs (24)
374
private ISdkResolverService SdkResolverService => ((this as IBuildComponentHost).GetComponent(
BuildComponentType
.SdkResolverService) as ISdkResolverService)!;
380
ILoggingService IBuildComponentHost.LoggingService => _componentFactories.GetComponent<ILoggingService>(
BuildComponentType
.LoggingService);
571
_nodeManager = ((IBuildComponentHost)this).GetComponent(
BuildComponentType
.NodeManager) as INodeManager;
603
_taskHostNodeManager = ((IBuildComponentHost)this).GetComponent<INodeManager>(
BuildComponentType
.TaskHostNodeManager);
604
_scheduler = ((IBuildComponentHost)this).GetComponent<IScheduler>(
BuildComponentType
.Scheduler);
695
_configCache = ((IBuildComponentHost)this).GetComponent<IConfigCache>(
BuildComponentType
.ConfigCache);
696
_resultsCache = ((IBuildComponentHost)this).GetComponent<IResultsCache>(
BuildComponentType
.ResultsCache);
872
_configCache = ((IBuildComponentHost)this).GetComponent<IConfigCache>(
BuildComponentType
.ConfigCache);
873
_resultsCache = ((IBuildComponentHost)this).GetComponent<IResultsCache>(
BuildComponentType
.ResultsCache);
893
_configCache = ((IBuildComponentHost)this).GetComponent(
BuildComponentType
.ConfigCache) as IConfigCache;
1223
_nodeManager ??= (INodeManager)((IBuildComponentHost)this).GetComponent(
BuildComponentType
.NodeManager);
1263
void IBuildComponentHost.RegisterFactory(
BuildComponentType
componentType, BuildComponentFactoryDelegate factory)
1273
IBuildComponent IBuildComponentHost.GetComponent(
BuildComponentType
type)
1278
TComponent IBuildComponentHost.GetComponent<TComponent>(
BuildComponentType
type)
2538
ILoggingService loggingService = ((IBuildComponentHost)this).GetComponent<ILoggingService>(
BuildComponentType
.LoggingService);
2551
ILoggingService loggingService = ((IBuildComponentHost)this).GetComponent<ILoggingService>(
BuildComponentType
.LoggingService);
2725
IConfigCache configCache = _componentFactories.GetComponent<IConfigCache>(
BuildComponentType
.ConfigCache);
2825
ILoggingService loggingService = ((IBuildComponentHost)this).GetComponent<ILoggingService>(
BuildComponentType
.LoggingService);
2975
_componentFactories.ReplaceFactory(
BuildComponentType
.LoggingService, loggingService as IBuildComponent);
2988
((IBuildComponentHost)this).GetComponent(
BuildComponentType
.BuildCheckManagerProvider) as IBuildCheckManagerProvider;
3179
_componentFactories.ShutdownComponent(
BuildComponentType
.LoggingService);
3186
_componentFactories.ReplaceFactory(
BuildComponentType
.LoggingService, (IBuildComponent?)null);
3285
_componentFactories.ReplaceFactory(
BuildComponentType
.ConfigCache, new ConfigCacheWithOverride(cacheAggregation.ConfigCache));
3286
_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
.TelemetryForwarder] = new BuildComponentEntry(
BuildComponentType
.TelemetryForwarder, TelemetryForwarderProvider.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)
286
IBuildCheckManagerProvider buildCheckProvider = (_componentHost.GetComponent(
BuildComponentType
.BuildCheckManagerProvider) as IBuildCheckManagerProvider);
290
ITelemetryForwarder telemetryForwarder = (_componentHost.GetComponent(
BuildComponentType
.TelemetryForwarder) as TelemetryForwarderProvider)!.Instance;
342
IResultsCache cache = (IResultsCache)_componentHost.GetComponent(
BuildComponentType
.ResultsCache);
345
BuildRequestConfiguration config = ((IConfigCache)_componentHost.GetComponent(
BuildComponentType
.ConfigCache))[request.ConfigurationId];
434
IResultsCache resultsCache = (IResultsCache)_componentHost.GetComponent(
BuildComponentType
.ResultsCache);
435
IConfigCache configCache = (IConfigCache)_componentHost.GetComponent(
BuildComponentType
.ConfigCache);
515
IConfigCache globalConfigurations = (IConfigCache)_componentHost.GetComponent(
BuildComponentType
.ConfigCache);
525
IResultsCache resultsCache = (IResultsCache)_componentHost.GetComponent(
BuildComponentType
.ResultsCache);
599
_configCache = (IConfigCache)host.GetComponent(
BuildComponentType
.ConfigCache);
626
internal static IBuildComponent CreateComponent(
BuildComponentType
type)
628
ErrorUtilities.VerifyThrow(type ==
BuildComponentType
.RequestEngine, "Cannot create component of type {0}", type);
881
_componentHost.GetComponent(
BuildComponentType
.ResultsCache) as IResultsCache;
947
IRequestBuilder builder = (IRequestBuilder)_componentHost.GetComponent(
BuildComponentType
.RequestBuilder);
1124
IConfigCache globalConfigCache = (IConfigCache)_componentHost.GetComponent(
BuildComponentType
.ConfigCache);
1215
IResultsCache resultsCache = (IResultsCache)_componentHost.GetComponent(
BuildComponentType
.ResultsCache);
BackEnd\Components\Caching\ConfigCache.cs (2)
389
internal static IBuildComponent CreateComponent(
BuildComponentType
componentType)
391
ErrorUtilities.VerifyThrow(componentType ==
BuildComponentType
.ConfigCache, "Cannot create components of type {0}", componentType);
BackEnd\Components\Caching\RegisteredTaskObjectCache.cs (2)
60
internal static IBuildComponent CreateComponent(
BuildComponentType
type)
62
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)
21
public static IBuildComponent CreateComponent(
BuildComponentType
type)
23
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)
361
internal static IBuildComponent CreateComponent(
BuildComponentType
type)
363
ErrorUtilities.VerifyThrow(type ==
BuildComponentType
.InProcNodeProvider, "Cannot create component of type {0}", type);
BackEnd\Components\Communications\NodeProviderOutOfProc.cs (2)
195
internal static IBuildComponent CreateComponent(
BuildComponentType
componentType)
197
ErrorUtilities.VerifyThrow(componentType ==
BuildComponentType
.OutOfProcNodeProvider, "Factory cannot create components of type {0}", componentType);
BackEnd\Components\Communications\NodeProviderOutOfProcBase.cs (1)
336
INodeLauncher nodeLauncher = (INodeLauncher)_componentHost.GetComponent(
BuildComponentType
.NodeLauncher);
BackEnd\Components\Communications\NodeProviderOutOfProcTaskHost.cs (2)
358
internal static IBuildComponent CreateComponent(
BuildComponentType
componentType)
360
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)
311
_configCache = new Lazy<IConfigCache>(() => (IConfigCache)_componentHost.GetComponent(
BuildComponentType
.ConfigCache), LazyThreadSafetyMode.PublicationOnly);
880
_buildEngineDataRouter = (buildComponentHost.GetComponent(
BuildComponentType
.BuildCheckManagerProvider) as IBuildCheckManagerProvider)?.BuildEngineDataRouter;
BackEnd\Components\Logging\LoggingServiceFactory.cs (2)
49
public IBuildComponent CreateInstance(
BuildComponentType
type)
51
ErrorUtilities.VerifyThrow(type ==
BuildComponentType
.LoggingService, "Cannot create components of type {0}", type);
BackEnd\Components\RequestBuilder\RequestBuilder.cs (7)
213
_targetBuilder = (ITargetBuilder)_componentHost.GetComponent(
BuildComponentType
.TargetBuilder);
628
internal static IBuildComponent CreateComponent(
BuildComponentType
type)
630
ErrorUtilities.VerifyThrow(type ==
BuildComponentType
.RequestBuilder, "Cannot create components of type {0}", type);
1100
: (_componentHost.GetComponent(
BuildComponentType
.BuildCheckManagerProvider) as IBuildCheckManagerProvider)!.Instance;
1225
var resultsCache = (IResultsCache)_componentHost.GetComponent(
BuildComponentType
.ResultsCache);
1254
((TelemetryForwarderProvider)_componentHost.GetComponent(
BuildComponentType
.TelemetryForwarder))
1262
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)
226
internal static IBuildComponent CreateComponent(
BuildComponentType
type)
228
ErrorUtilities.VerifyThrow(type ==
BuildComponentType
.TaskBuilder, "Cannot create components of type {0}", type);
BackEnd\Components\RequestBuilder\TaskHost.cs (3)
620
var objectCache = (IRegisteredTaskObjectCache)_host.GetComponent(
BuildComponentType
.RegisteredTaskObjectCache);
629
var objectCache = (IRegisteredTaskObjectCache)_host.GetComponent(
BuildComponentType
.RegisteredTaskObjectCache);
638
var objectCache = (IRegisteredTaskObjectCache)_host.GetComponent(
BuildComponentType
.RegisteredTaskObjectCache);
BackEnd\Components\Scheduler\Scheduler.cs (5)
630
_resultsCache = (IResultsCache)_componentHost.GetComponent(
BuildComponentType
.ResultsCache);
631
_configCache = (IConfigCache)_componentHost.GetComponent(
BuildComponentType
.ConfigCache);
648
internal static IBuildComponent CreateComponent(
BuildComponentType
componentType)
650
ErrorUtilities.VerifyThrow(componentType ==
BuildComponentType
.Scheduler, "Cannot create components of type {0}", componentType);
1962
var configCache = (IConfigCache)_componentHost.GetComponent(
BuildComponentType
.ConfigCache);
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)
26
public IBuildComponent CreateInstance(
BuildComponentType
type)
BackEnd\Node\InProcNode.cs (2)
117
_buildRequestEngine = componentHost.GetComponent(
BuildComponentType
.RequestEngine) as IBuildRequestEngine;
334
IRegisteredTaskObjectCache objectCache = (IRegisteredTaskObjectCache)(_componentHost.GetComponent(
BuildComponentType
.RegisteredTaskObjectCache));
BackEnd\Node\OutOfProcNode.cs (13)
153
_buildRequestEngine = (this as IBuildComponentHost).GetComponent(
BuildComponentType
.RequestEngine) as IBuildRequestEngine;
154
_globalConfigCache = (this as IBuildComponentHost).GetComponent(
BuildComponentType
.ConfigCache) as IConfigCache;
155
_taskHostNodeManager = (this as IBuildComponentHost).GetComponent(
BuildComponentType
.TaskHostNodeManager) as INodeManager;
159
((IBuildComponentHost)this).RegisterFactory(
BuildComponentType
.SdkResolverService, sdkResolverServiceFactory.CreateInstance);
160
_sdkResolverService = (this as IBuildComponentHost).GetComponent(
BuildComponentType
.SdkResolverService) as ISdkResolverService;
293
void IBuildComponentHost.RegisterFactory(
BuildComponentType
factoryType, BuildComponentFactoryDelegate factory)
303
IBuildComponent IBuildComponentHost.GetComponent(
BuildComponentType
type)
308
TComponent IBuildComponentHost.GetComponent<TComponent>(
BuildComponentType
type)
474
IRegisteredTaskObjectCache objectCache = (IRegisteredTaskObjectCache)(_componentFactories.GetComponent(
BuildComponentType
.RegisteredTaskObjectCache));
548
if (_componentFactories.GetComponent(
BuildComponentType
.ConfigCache) is IConfigCache configCache)
553
if (_componentFactories.GetComponent(
BuildComponentType
.ResultsCache) is IResultsCache resultsCache)
771
_componentFactories.ReplaceFactory(
BuildComponentType
.LoggingService, loggingServiceFactory.CreateInstance);
773
_loggingService = _componentFactories.GetComponent(
BuildComponentType
.LoggingService) as ILoggingService;
BackEnd\Shared\BuildRequestConfiguration.cs (1)
468
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)
263
_taskHostProvider = (NodeProviderOutOfProcTaskHost)_buildComponentHost.GetComponent(
BuildComponentType
.OutOfProcTaskHostNodeProvider);
TelemetryInfra\TelemetryForwarderProvider.cs (2)
22
internal static IBuildComponent CreateComponent(
BuildComponentType
type)
24
ErrorUtilities.VerifyThrow(type ==
BuildComponentType
.TelemetryForwarder, "Cannot create components of type {0}", type);
Microsoft.Build.Engine.UnitTests (181)
BackEnd\BuildManager_Tests.cs (4)
1921
host.GetComponent(
BuildComponentType
.ConfigCache);
1947
host.GetComponent(
BuildComponentType
.ConfigCache);
1979
host.GetComponent(
BuildComponentType
.ConfigCache);
2031
host.GetComponent(
BuildComponentType
.ConfigCache);
BackEnd\BuildRequestEngine_Tests.cs (5)
293
_engine = (IBuildRequestEngine)_host.GetComponent(
BuildComponentType
.RequestEngine);
294
_cache = (IConfigCache)_host.GetComponent(
BuildComponentType
.ConfigCache);
400
MockRequestBuilder builder = (MockRequestBuilder)_host.GetComponent(
BuildComponentType
.RequestBuilder);
453
MockRequestBuilder builder = (MockRequestBuilder)_host.GetComponent(
BuildComponentType
.RequestBuilder);
519
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
.TelemetryForwarder => (IBuildComponent)_telemetryForwarder,
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)
61
_requestBuilder = (IRequestBuilder)_host.GetComponent(
BuildComponentType
.RequestBuilder);
83
TestTargetBuilder targetBuilder = (TestTargetBuilder)_host.GetComponent(
BuildComponentType
.TargetBuilder);
84
IConfigCache configCache = (IConfigCache)_host.GetComponent(
BuildComponentType
.ConfigCache);
113
TestTargetBuilder targetBuilder = (TestTargetBuilder)_host.GetComponent(
BuildComponentType
.TargetBuilder);
114
IConfigCache configCache = (IConfigCache)_host.GetComponent(
BuildComponentType
.ConfigCache);
146
TestTargetBuilder targetBuilder = (TestTargetBuilder)_host.GetComponent(
BuildComponentType
.TargetBuilder);
147
IConfigCache configCache = (IConfigCache)_host.GetComponent(
BuildComponentType
.ConfigCache);
185
TestTargetBuilder targetBuilder = (TestTargetBuilder)_host.GetComponent(
BuildComponentType
.TargetBuilder);
186
IConfigCache configCache = (IConfigCache)_host.GetComponent(
BuildComponentType
.ConfigCache);
224
TestTargetBuilder targetBuilder = (TestTargetBuilder)_host.GetComponent(
BuildComponentType
.TargetBuilder);
225
IConfigCache configCache = (IConfigCache)_host.GetComponent(
BuildComponentType
.ConfigCache);
300
IConfigCache configCache = (IConfigCache)_host.GetComponent(
BuildComponentType
.ConfigCache);
BackEnd\Scheduler_Tests.cs (7)
67
NodeProviderInProc nodeProviderInProc = ((IBuildComponentHost)BuildManager.DefaultBuildManager).GetComponent(
BuildComponentType
.InProcNodeProvider) as NodeProviderInProc;
94
NodeProviderInProc nodeProviderInProc = ((IBuildComponentHost)_buildManager).GetComponent(
BuildComponentType
.InProcNodeProvider) as NodeProviderInProc;
374
NodeProviderInProc nodeProviderInProc = ((IBuildComponentHost)BuildManager.DefaultBuildManager).GetComponent(
BuildComponentType
.InProcNodeProvider) as NodeProviderInProc;
568
NodeProviderInProc nodeProviderInProc = ((IBuildComponentHost)BuildManager.DefaultBuildManager).GetComponent(
BuildComponentType
.InProcNodeProvider) as NodeProviderInProc;
612
Assert.Null(((ResultsCacheWithOverride)_host.GetComponent(
BuildComponentType
.ResultsCache)).CurrentCache.GetResultsForConfiguration(1));
737
(_host.GetComponent(
BuildComponentType
.ConfigCache) as IConfigCache).AddConfiguration(config);
760
(_host.GetComponent(
BuildComponentType
.ResultsCache) as IResultsCache).AddResult(result);
BackEnd\SdkResultOutOfProc_Tests.cs (1)
273
((IBuildComponentHost)_buildManager).RegisterFactory(
BuildComponentType
.SdkResolverService, type =>
BackEnd\TargetBuilder_Tests.cs (90)
101
TargetBuilder builder = (TargetBuilder)_host.GetComponent(
BuildComponentType
.TargetBuilder);
102
IConfigCache cache = (IConfigCache)_host.GetComponent(
BuildComponentType
.ConfigCache);
121
TargetBuilder builder = (TargetBuilder)_host.GetComponent(
BuildComponentType
.TargetBuilder);
122
IConfigCache cache = (IConfigCache)_host.GetComponent(
BuildComponentType
.ConfigCache);
134
IResultsCache resultsCache = (IResultsCache)_host.GetComponent(
BuildComponentType
.ResultsCache);
148
TargetBuilder builder = (TargetBuilder)_host.GetComponent(
BuildComponentType
.TargetBuilder);
149
IConfigCache cache = (IConfigCache)_host.GetComponent(
BuildComponentType
.ConfigCache);
157
IResultsCache resultsCache = (IResultsCache)_host.GetComponent(
BuildComponentType
.ResultsCache);
174
TargetBuilder builder = (TargetBuilder)_host.GetComponent(
BuildComponentType
.TargetBuilder);
175
MockTaskBuilder taskBuilder = (MockTaskBuilder)_host.GetComponent(
BuildComponentType
.TaskBuilder);
178
IConfigCache cache = (IConfigCache)_host.GetComponent(
BuildComponentType
.ConfigCache);
190
IResultsCache resultsCache = (IResultsCache)_host.GetComponent(
BuildComponentType
.ResultsCache);
362
TargetBuilder builder = (TargetBuilder)_host.GetComponent(
BuildComponentType
.TargetBuilder);
363
IConfigCache cache = (IConfigCache)_host.GetComponent(
BuildComponentType
.ConfigCache);
502
TargetBuilder builder = (TargetBuilder)_host.GetComponent(
BuildComponentType
.TargetBuilder);
503
IConfigCache cache = (IConfigCache)_host.GetComponent(
BuildComponentType
.ConfigCache);
528
TargetBuilder builder = (TargetBuilder)_host.GetComponent(
BuildComponentType
.TargetBuilder);
529
IConfigCache cache = (IConfigCache)_host.GetComponent(
BuildComponentType
.ConfigCache);
554
TargetBuilder builder = (TargetBuilder)_host.GetComponent(
BuildComponentType
.TargetBuilder);
555
IConfigCache cache = (IConfigCache)_host.GetComponent(
BuildComponentType
.ConfigCache);
579
MockTaskBuilder taskBuilder = (MockTaskBuilder)_host.GetComponent(
BuildComponentType
.TaskBuilder);
584
TargetBuilder builder = (TargetBuilder)_host.GetComponent(
BuildComponentType
.TargetBuilder);
585
IConfigCache cache = (IConfigCache)_host.GetComponent(
BuildComponentType
.ConfigCache);
614
MockTaskBuilder taskBuilder = (MockTaskBuilder)_host.GetComponent(
BuildComponentType
.TaskBuilder);
619
TargetBuilder builder = (TargetBuilder)_host.GetComponent(
BuildComponentType
.TargetBuilder);
620
IConfigCache cache = (IConfigCache)_host.GetComponent(
BuildComponentType
.ConfigCache);
651
TargetBuilder builder = (TargetBuilder)_host.GetComponent(
BuildComponentType
.TargetBuilder);
652
IConfigCache cache = (IConfigCache)_host.GetComponent(
BuildComponentType
.ConfigCache);
682
TargetBuilder builder = (TargetBuilder)_host.GetComponent(
BuildComponentType
.TargetBuilder);
683
IConfigCache cache = (IConfigCache)_host.GetComponent(
BuildComponentType
.ConfigCache);
708
TargetBuilder builder = (TargetBuilder)_host.GetComponent(
BuildComponentType
.TargetBuilder);
709
IConfigCache cache = (IConfigCache)_host.GetComponent(
BuildComponentType
.ConfigCache);
744
TargetBuilder builder = (TargetBuilder)_host.GetComponent(
BuildComponentType
.TargetBuilder);
745
IConfigCache cache = (IConfigCache)_host.GetComponent(
BuildComponentType
.ConfigCache);
770
TargetBuilder builder = (TargetBuilder)_host.GetComponent(
BuildComponentType
.TargetBuilder);
771
IConfigCache cache = (IConfigCache)_host.GetComponent(
BuildComponentType
.ConfigCache);
797
TargetBuilder builder = (TargetBuilder)_host.GetComponent(
BuildComponentType
.TargetBuilder);
798
IConfigCache cache = (IConfigCache)_host.GetComponent(
BuildComponentType
.ConfigCache);
822
MockTaskBuilder taskBuilder = (MockTaskBuilder)_host.GetComponent(
BuildComponentType
.TaskBuilder);
827
TargetBuilder builder = (TargetBuilder)_host.GetComponent(
BuildComponentType
.TargetBuilder);
828
IConfigCache cache = (IConfigCache)_host.GetComponent(
BuildComponentType
.ConfigCache);
866
MockTaskBuilder taskBuilder = (MockTaskBuilder)_host.GetComponent(
BuildComponentType
.TaskBuilder);
871
TargetBuilder builder = (TargetBuilder)_host.GetComponent(
BuildComponentType
.TargetBuilder);
872
IConfigCache cache = (IConfigCache)_host.GetComponent(
BuildComponentType
.ConfigCache);
898
TargetBuilder builder = (TargetBuilder)_host.GetComponent(
BuildComponentType
.TargetBuilder);
899
IConfigCache cache = (IConfigCache)_host.GetComponent(
BuildComponentType
.ConfigCache);
925
TargetBuilder builder = (TargetBuilder)_host.GetComponent(
BuildComponentType
.TargetBuilder);
926
IConfigCache cache = (IConfigCache)_host.GetComponent(
BuildComponentType
.ConfigCache);
957
TargetBuilder builder = (TargetBuilder)_host.GetComponent(
BuildComponentType
.TargetBuilder);
958
IConfigCache cache = (IConfigCache)_host.GetComponent(
BuildComponentType
.ConfigCache);
1055
TargetBuilder builder = (TargetBuilder)_host.GetComponent(
BuildComponentType
.TargetBuilder);
1056
IConfigCache cache = (IConfigCache)_host.GetComponent(
BuildComponentType
.ConfigCache);
1090
TargetBuilder builder = (TargetBuilder)_host.GetComponent(
BuildComponentType
.TargetBuilder);
1091
IConfigCache cache = (IConfigCache)_host.GetComponent(
BuildComponentType
.ConfigCache);
1141
TargetBuilder builder = (TargetBuilder)_host.GetComponent(
BuildComponentType
.TargetBuilder);
1142
IConfigCache cache = (IConfigCache)_host.GetComponent(
BuildComponentType
.ConfigCache);
1201
TargetBuilder builder = (TargetBuilder)_host.GetComponent(
BuildComponentType
.TargetBuilder);
1202
IConfigCache cache = (IConfigCache)_host.GetComponent(
BuildComponentType
.ConfigCache);
1238
MockTaskBuilder taskBuilder = (MockTaskBuilder)_host.GetComponent(
BuildComponentType
.TaskBuilder);
1243
TargetBuilder builder = (TargetBuilder)_host.GetComponent(
BuildComponentType
.TargetBuilder);
1244
IConfigCache cache = (IConfigCache)_host.GetComponent(
BuildComponentType
.ConfigCache);
1289
TargetBuilder builder = (TargetBuilder)_host.GetComponent(
BuildComponentType
.TargetBuilder);
1290
IConfigCache cache = (IConfigCache)_host.GetComponent(
BuildComponentType
.ConfigCache);
1320
TargetBuilder builder = (TargetBuilder)_host.GetComponent(
BuildComponentType
.TargetBuilder);
1321
IConfigCache cache = (IConfigCache)_host.GetComponent(
BuildComponentType
.ConfigCache);
1394
TargetBuilder builder = (TargetBuilder)_host.GetComponent(
BuildComponentType
.TargetBuilder);
1395
IConfigCache cache = (IConfigCache)_host.GetComponent(
BuildComponentType
.ConfigCache);
1423
TargetBuilder builder = (TargetBuilder)_host.GetComponent(
BuildComponentType
.TargetBuilder);
1424
MockTaskBuilder taskBuilder = (MockTaskBuilder)_host.GetComponent(
BuildComponentType
.TaskBuilder);
1428
IConfigCache cache = (IConfigCache)_host.GetComponent(
BuildComponentType
.ConfigCache);
1434
IResultsCache resultsCache = (IResultsCache)_host.GetComponent(
BuildComponentType
.ResultsCache);
1451
TargetBuilder builder = (TargetBuilder)_host.GetComponent(
BuildComponentType
.TargetBuilder);
1452
MockTaskBuilder taskBuilder = (MockTaskBuilder)_host.GetComponent(
BuildComponentType
.TaskBuilder);
1455
IConfigCache cache = (IConfigCache)_host.GetComponent(
BuildComponentType
.ConfigCache);
1460
IResultsCache resultsCache = (IResultsCache)_host.GetComponent(
BuildComponentType
.ResultsCache);
1544
MockTaskBuilder mockBuilder = (MockTaskBuilder)_host.GetComponent(
BuildComponentType
.TaskBuilder);
1674
IConfigCache cache = (IConfigCache)_host.GetComponent(
BuildComponentType
.ConfigCache);
1706
MockTaskBuilder taskBuilder = (MockTaskBuilder)_host.GetComponent(
BuildComponentType
.TaskBuilder);
1709
TargetBuilder builder = (TargetBuilder)_host.GetComponent(
BuildComponentType
.TargetBuilder);
1710
IConfigCache cache = (IConfigCache)_host.GetComponent(
BuildComponentType
.ConfigCache);
1844
public IBuildComponent GetComponent(
BuildComponentType
type)
1848
BuildComponentType
.ConfigCache => (IBuildComponent)_configCache,
1849
BuildComponentType
.LoggingService => (IBuildComponent)_loggingService,
1850
BuildComponentType
.ResultsCache => (IBuildComponent)_resultsCache,
1851
BuildComponentType
.RequestBuilder => (IBuildComponent)_requestBuilder,
1852
BuildComponentType
.TaskBuilder => (IBuildComponent)_taskBuilder,
1853
BuildComponentType
.TargetBuilder => (IBuildComponent)_targetBuilder,
1854
BuildComponentType
.SdkResolverService => (IBuildComponent)_sdkResolverService,
1859
public TComponent GetComponent<TComponent>(
BuildComponentType
type) where TComponent : IBuildComponent
1865
public void RegisterFactory(
BuildComponentType
type, BuildComponentFactoryDelegate factory)
BackEnd\TargetEntry_Tests.cs (24)
208
MockTaskBuilder taskBuilder = (MockTaskBuilder)_host.GetComponent(
BuildComponentType
.TaskBuilder);
253
MockTaskBuilder taskBuilder = (MockTaskBuilder)_host.GetComponent(
BuildComponentType
.TaskBuilder);
321
MockTaskBuilder taskBuilder = (MockTaskBuilder)_host.GetComponent(
BuildComponentType
.TaskBuilder);
353
MockTaskBuilder taskBuilder = (MockTaskBuilder)_host.GetComponent(
BuildComponentType
.TaskBuilder);
462
MockTaskBuilder taskBuilder = (MockTaskBuilder)_host.GetComponent(
BuildComponentType
.TaskBuilder);
489
MockTaskBuilder taskBuilder = (MockTaskBuilder)_host.GetComponent(
BuildComponentType
.TaskBuilder);
507
MockTaskBuilder taskBuilder = (MockTaskBuilder)_host.GetComponent(
BuildComponentType
.TaskBuilder);
528
MockTaskBuilder taskBuilder = (MockTaskBuilder)_host.GetComponent(
BuildComponentType
.TaskBuilder);
549
MockTaskBuilder taskBuilder = (MockTaskBuilder)_host.GetComponent(
BuildComponentType
.TaskBuilder);
570
MockTaskBuilder taskBuilder = (MockTaskBuilder)_host.GetComponent(
BuildComponentType
.TaskBuilder);
591
MockTaskBuilder taskBuilder = (MockTaskBuilder)_host.GetComponent(
BuildComponentType
.TaskBuilder);
612
MockTaskBuilder taskBuilder = (MockTaskBuilder)_host.GetComponent(
BuildComponentType
.TaskBuilder);
834
NodeProviderInProc nodeProviderInProc = ((IBuildComponentHost)BuildManager.DefaultBuildManager).GetComponent(
BuildComponentType
.InProcNodeProvider) as NodeProviderInProc;
893
NodeProviderInProc inProcNodeProvider = ((IBuildComponentHost)manager).GetComponent(
BuildComponentType
.InProcNodeProvider) as NodeProviderInProc;
1002
ITaskBuilder taskBuilder = _host.GetComponent(
BuildComponentType
.TaskBuilder) as ITaskBuilder;
1315
public IBuildComponent GetComponent(
BuildComponentType
type)
1319
BuildComponentType
.ConfigCache => (IBuildComponent)_configCache,
1320
BuildComponentType
.LoggingService => (IBuildComponent)_loggingService,
1321
BuildComponentType
.ResultsCache => (IBuildComponent)_resultsCache,
1322
BuildComponentType
.RequestBuilder => (IBuildComponent)_requestBuilder,
1323
BuildComponentType
.TaskBuilder => (IBuildComponent)_taskBuilder,
1324
BuildComponentType
.SdkResolverService => (IBuildComponent)_sdkResolverService,
1329
public TComponent GetComponent<TComponent>(
BuildComponentType
type) where TComponent : IBuildComponent
1335
public void RegisterFactory(
BuildComponentType
type, BuildComponentFactoryDelegate factory)
BackEnd\TaskBuilder_Tests.cs (10)
1240
IConfigCache cache = (IConfigCache)_host.GetComponent(
BuildComponentType
.ConfigCache);
1372
public IBuildComponent GetComponent(
BuildComponentType
type)
1376
BuildComponentType
.ConfigCache => (IBuildComponent)_configCache,
1377
BuildComponentType
.LoggingService => (IBuildComponent)_loggingService,
1378
BuildComponentType
.ResultsCache => (IBuildComponent)_resultsCache,
1379
BuildComponentType
.RequestBuilder => (IBuildComponent)_requestBuilder,
1380
BuildComponentType
.TargetBuilder => (IBuildComponent)_targetBuilder,
1381
BuildComponentType
.SdkResolverService => (IBuildComponent)_sdkResolverService,
1386
public TComponent GetComponent<TComponent>(
BuildComponentType
type) where TComponent : IBuildComponent
1392
public void RegisterFactory(
BuildComponentType
type, BuildComponentFactoryDelegate factory)
BackEnd\TaskHost_Tests.cs (1)
66
_loggingService = loggingFactory.CreateInstance(
BuildComponentType
.LoggingService) as LoggingService;
Construction\SolutionProjectGenerator_Tests.cs (4)
2190
NodeProviderInProc nodeProviderInProc = ((IBuildComponentHost)BuildManager.DefaultBuildManager).GetComponent(
BuildComponentType
.InProcNodeProvider) as NodeProviderInProc;
2217
NodeProviderInProc nodeProviderInProc = ((IBuildComponentHost)buildManager).GetComponent(
BuildComponentType
.InProcNodeProvider) as NodeProviderInProc;
2278
NodeProviderInProc nodeProviderInProc = ((IBuildComponentHost)BuildManager.DefaultBuildManager).GetComponent(
BuildComponentType
.InProcNodeProvider) as NodeProviderInProc;
2305
NodeProviderInProc nodeProviderInProc = ((IBuildComponentHost)buildManager).GetComponent(
BuildComponentType
.InProcNodeProvider) as NodeProviderInProc;