368 references to BuildComponentType
Microsoft.Build (188)
BackEnd\BuildManager\BuildManager.cs (29)
374private ISdkResolverService SdkResolverService => ((this as IBuildComponentHost).GetComponent(BuildComponentType.SdkResolverService) as ISdkResolverService)!; 380ILoggingService IBuildComponentHost.LoggingService => _componentFactories.GetComponent<ILoggingService>(BuildComponentType.LoggingService); 566NodeLauncher nodeLauncher = ((IBuildComponentHost)this).GetComponent<NodeLauncher>(BuildComponentType.NodeLauncher); 586_nodeManager = ((IBuildComponentHost)this).GetComponent(BuildComponentType.NodeManager) as INodeManager; 606var fileAccessManager = ((IBuildComponentHost)this).GetComponent<IFileAccessManager>(BuildComponentType.FileAccessManager); 618_taskHostNodeManager = ((IBuildComponentHost)this).GetComponent<INodeManager>(BuildComponentType.TaskHostNodeManager); 619_scheduler = ((IBuildComponentHost)this).GetComponent<IScheduler>(BuildComponentType.Scheduler); 710_configCache = ((IBuildComponentHost)this).GetComponent<IConfigCache>(BuildComponentType.ConfigCache); 711_resultsCache = ((IBuildComponentHost)this).GetComponent<IResultsCache>(BuildComponentType.ResultsCache); 781_componentFactories.ReplaceFactory(BuildComponentType.NodeLauncher, DetouredNodeLauncher.CreateComponent); 887_configCache = ((IBuildComponentHost)this).GetComponent<IConfigCache>(BuildComponentType.ConfigCache); 888_resultsCache = ((IBuildComponentHost)this).GetComponent<IResultsCache>(BuildComponentType.ResultsCache); 908_configCache = ((IBuildComponentHost)this).GetComponent(BuildComponentType.ConfigCache) as IConfigCache; 1238_nodeManager ??= (INodeManager)((IBuildComponentHost)this).GetComponent(BuildComponentType.NodeManager); 1278void IBuildComponentHost.RegisterFactory(BuildComponentType componentType, BuildComponentFactoryDelegate factory) 1288IBuildComponent IBuildComponentHost.GetComponent(BuildComponentType type) 1293TComponent IBuildComponentHost.GetComponent<TComponent>(BuildComponentType type) 2553ILoggingService loggingService = ((IBuildComponentHost)this).GetComponent<ILoggingService>(BuildComponentType.LoggingService); 2566ILoggingService loggingService = ((IBuildComponentHost)this).GetComponent<ILoggingService>(BuildComponentType.LoggingService); 2606((FileAccessManager)((IBuildComponentHost)this).GetComponent(BuildComponentType.FileAccessManager)).ReportFileAccess(fileAccessReport.FileAccessData, nodeId); 2621((FileAccessManager)((IBuildComponentHost)this).GetComponent(BuildComponentType.FileAccessManager)).ReportProcess(processReport.ProcessData, nodeId); 2740IConfigCache configCache = _componentFactories.GetComponent<IConfigCache>(BuildComponentType.ConfigCache); 2840ILoggingService loggingService = ((IBuildComponentHost)this).GetComponent<ILoggingService>(BuildComponentType.LoggingService); 2990_componentFactories.ReplaceFactory(BuildComponentType.LoggingService, loggingService as IBuildComponent); 3003((IBuildComponentHost)this).GetComponent(BuildComponentType.BuildCheckManagerProvider) as IBuildCheckManagerProvider; 3194_componentFactories.ShutdownComponent(BuildComponentType.LoggingService); 3201_componentFactories.ReplaceFactory(BuildComponentType.LoggingService, (IBuildComponent?)null); 3300_componentFactories.ReplaceFactory(BuildComponentType.ConfigCache, new ConfigCacheWithOverride(cacheAggregation.ConfigCache)); 3301_componentFactories.ReplaceFactory(BuildComponentType.ResultsCache, new ResultsCacheWithOverride(cacheAggregation.ResultsCache));
BackEnd\Components\BuildComponentFactoryCollection.cs (50)
26private 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); 94_componentEntriesByType[BuildComponentType.FileAccessManager] = new BuildComponentEntry(BuildComponentType.FileAccessManager, FileAccessManager.CreateComponent, CreationPattern.Singleton); 103foreach (KeyValuePair<BuildComponentType, BuildComponentEntry> componentEntry in _componentEntriesByType) 115public void ShutdownComponent(BuildComponentType componentType) 126public void ReplaceFactory(BuildComponentType componentType, BuildComponentFactoryDelegate factory) 137public void ReplaceFactory(BuildComponentType componentType, IBuildComponent instance) 149public void AddFactory(BuildComponentType componentType, BuildComponentFactoryDelegate factory, CreationPattern creationPattern) 159public IBuildComponent GetComponent(BuildComponentType type) 169internal TComponent GetComponent<TComponent>(BuildComponentType type) where TComponent : IBuildComponent 192public BuildComponentEntry(BuildComponentType type, BuildComponentFactoryDelegate factory, CreationPattern pattern) 202public BuildComponentEntry(BuildComponentType type, IBuildComponent singleton) 212private BuildComponentType ComponentType { get; }
BackEnd\Components\BuildRequestEngine\BuildRequestEngine.cs (15)
287IBuildCheckManagerProvider buildCheckProvider = (_componentHost.GetComponent(BuildComponentType.BuildCheckManagerProvider) as IBuildCheckManagerProvider); 291ITelemetryForwarder telemetryForwarder = (_componentHost.GetComponent(BuildComponentType.TelemetryForwarder) as TelemetryForwarderProvider)!.Instance; 345IResultsCache cache = (IResultsCache)_componentHost.GetComponent(BuildComponentType.ResultsCache); 348BuildRequestConfiguration config = ((IConfigCache)_componentHost.GetComponent(BuildComponentType.ConfigCache))[request.ConfigurationId]; 437IResultsCache resultsCache = (IResultsCache)_componentHost.GetComponent(BuildComponentType.ResultsCache); 438IConfigCache configCache = (IConfigCache)_componentHost.GetComponent(BuildComponentType.ConfigCache); 518IConfigCache globalConfigurations = (IConfigCache)_componentHost.GetComponent(BuildComponentType.ConfigCache); 528IResultsCache resultsCache = (IResultsCache)_componentHost.GetComponent(BuildComponentType.ResultsCache); 602_configCache = (IConfigCache)host.GetComponent(BuildComponentType.ConfigCache); 629internal static IBuildComponent CreateComponent(BuildComponentType type) 631ErrorUtilities.VerifyThrow(type == BuildComponentType.RequestEngine, "Cannot create component of type {0}", type); 884_componentHost.GetComponent(BuildComponentType.ResultsCache) as IResultsCache; 950IRequestBuilder builder = (IRequestBuilder)_componentHost.GetComponent(BuildComponentType.RequestBuilder); 1127IConfigCache globalConfigCache = (IConfigCache)_componentHost.GetComponent(BuildComponentType.ConfigCache); 1218IResultsCache resultsCache = (IResultsCache)_componentHost.GetComponent(BuildComponentType.ResultsCache);
BackEnd\Components\Caching\ConfigCache.cs (2)
389internal static IBuildComponent CreateComponent(BuildComponentType componentType) 391ErrorUtilities.VerifyThrow(componentType == BuildComponentType.ConfigCache, "Cannot create components of type {0}", componentType);
BackEnd\Components\Caching\RegisteredTaskObjectCache.cs (2)
60internal static IBuildComponent CreateComponent(BuildComponentType type) 62ErrorUtilities.VerifyThrow(type == BuildComponentType.RegisteredTaskObjectCache, "Cannot create components of type {0}", type);
BackEnd\Components\Caching\ResultsCache.cs (2)
300internal static IBuildComponent CreateComponent(BuildComponentType componentType) 302ErrorUtilities.VerifyThrow(componentType == BuildComponentType.ResultsCache, "Cannot create components of type {0}", componentType);
BackEnd\Components\Communications\DetouredNodeLauncher.cs (3)
30public static IBuildComponent CreateComponent(BuildComponentType type) 32ErrorUtilities.VerifyThrowArgumentOutOfRange(type == BuildComponentType.NodeLauncher, nameof(type)); 38_fileAccessManager = (IFileAccessManager)host.GetComponent(BuildComponentType.FileAccessManager);
BackEnd\Components\Communications\NodeLauncher.cs (2)
21public static IBuildComponent CreateComponent(BuildComponentType type) 23ErrorUtilities.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; 288internal static IBuildComponent CreateComponent(BuildComponentType type) 290ErrorUtilities.VerifyThrow(type == BuildComponentType.NodeManager, "Cannot create component of type {0}", type);
BackEnd\Components\Communications\NodeProviderInProc.cs (2)
361internal static IBuildComponent CreateComponent(BuildComponentType type) 363ErrorUtilities.VerifyThrow(type == BuildComponentType.InProcNodeProvider, "Cannot create component of type {0}", type);
BackEnd\Components\Communications\NodeProviderOutOfProc.cs (2)
195internal static IBuildComponent CreateComponent(BuildComponentType componentType) 197ErrorUtilities.VerifyThrow(componentType == BuildComponentType.OutOfProcNodeProvider, "Factory cannot create components of type {0}", componentType);
BackEnd\Components\Communications\NodeProviderOutOfProcBase.cs (1)
336INodeLauncher nodeLauncher = (INodeLauncher)_componentHost.GetComponent(BuildComponentType.NodeLauncher);
BackEnd\Components\Communications\NodeProviderOutOfProcTaskHost.cs (2)
358internal static IBuildComponent CreateComponent(BuildComponentType componentType) 360ErrorUtilities.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; 177internal static IBuildComponent CreateComponent(BuildComponentType type) 179ErrorUtilities.VerifyThrow(type == BuildComponentType.TaskHostNodeManager, "Cannot create component of type {0}", type);
BackEnd\Components\FileAccesses\FileAccessManager.cs (4)
37public static IBuildComponent CreateComponent(BuildComponentType type) 39ErrorUtilities.VerifyThrowArgumentOutOfRange(type == BuildComponentType.FileAccessManager, nameof(type)); 45_scheduler = host.GetComponent(BuildComponentType.Scheduler) as IScheduler; 46_configCache = host.GetComponent(BuildComponentType.ConfigCache) as IConfigCache;
BackEnd\Components\FileAccesses\OutOfProcNodeFileAccessManager.cs (2)
26public static IBuildComponent CreateComponent(BuildComponentType type, Action<INodePacket> sendPacket) 28ErrorUtilities.VerifyThrowArgumentOutOfRange(type == BuildComponentType.FileAccessManager, nameof(type));
BackEnd\Components\IBuildComponentHost.cs (4)
17internal delegate IBuildComponent BuildComponentFactoryDelegate(BuildComponentType type); 194void RegisterFactory(BuildComponentType factoryType, BuildComponentFactoryDelegate factory); 201IBuildComponent GetComponent(BuildComponentType type); 209TComponent 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)
49public IBuildComponent CreateInstance(BuildComponentType type) 51ErrorUtilities.VerifyThrow(type == BuildComponentType.LoggingService, "Cannot create components of type {0}", type);
BackEnd\Components\RequestBuilder\RequestBuilder.cs (7)
213_targetBuilder = (ITargetBuilder)_componentHost.GetComponent(BuildComponentType.TargetBuilder); 628internal static IBuildComponent CreateComponent(BuildComponentType type) 630ErrorUtilities.VerifyThrow(type == BuildComponentType.RequestBuilder, "Cannot create components of type {0}", type); 1100: (_componentHost.GetComponent(BuildComponentType.BuildCheckManagerProvider) as IBuildCheckManagerProvider)!.Instance; 1225var resultsCache = (IResultsCache)_componentHost.GetComponent(BuildComponentType.ResultsCache); 1254((TelemetryForwarderProvider)_componentHost.GetComponent(BuildComponentType.TelemetryForwarder)) 1262IResultsCache resultsCache = (IResultsCache)_componentHost.GetComponent(BuildComponentType.ResultsCache);
BackEnd\Components\RequestBuilder\TargetBuilder.cs (5)
138IResultsCache resultsCache = (IResultsCache)_componentHost.GetComponent(BuildComponentType.ResultsCache); 170ITaskBuilder taskBuilder = _componentHost.GetComponent(BuildComponentType.TaskBuilder) as ITaskBuilder; 266ITaskBuilder taskBuilder = _componentHost.GetComponent(BuildComponentType.TaskBuilder) as ITaskBuilder; 398internal static IBuildComponent CreateComponent(BuildComponentType type) 400ErrorUtilities.VerifyThrow(type == BuildComponentType.TargetBuilder, "Cannot create components of type {0}", type);
BackEnd\Components\RequestBuilder\TaskBuilder.cs (2)
226internal static IBuildComponent CreateComponent(BuildComponentType type) 228ErrorUtilities.VerifyThrow(type == BuildComponentType.TaskBuilder, "Cannot create components of type {0}", type);
BackEnd\Components\RequestBuilder\TaskHost.cs (4)
620var objectCache = (IRegisteredTaskObjectCache)_host.GetComponent(BuildComponentType.RegisteredTaskObjectCache); 629var objectCache = (IRegisteredTaskObjectCache)_host.GetComponent(BuildComponentType.RegisteredTaskObjectCache); 638var objectCache = (IRegisteredTaskObjectCache)_host.GetComponent(BuildComponentType.RegisteredTaskObjectCache); 955((IFileAccessManager)buildComponentHost.GetComponent(BuildComponentType.FileAccessManager)).ReportFileAccess(fileAccessData, buildComponentHost.BuildParameters.NodeId);
BackEnd\Components\Scheduler\Scheduler.cs (5)
630_resultsCache = (IResultsCache)_componentHost.GetComponent(BuildComponentType.ResultsCache); 631_configCache = (IConfigCache)_componentHost.GetComponent(BuildComponentType.ConfigCache); 648internal static IBuildComponent CreateComponent(BuildComponentType componentType) 650ErrorUtilities.VerifyThrow(componentType == BuildComponentType.Scheduler, "Cannot create components of type {0}", componentType); 1962var 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"/>. 34public static IBuildComponent CreateComponent(BuildComponentType type) 36ErrorUtilities.VerifyThrowArgumentOutOfRange(type == BuildComponentType.SdkResolverService, nameof(type)); 75ILoggingService loggingService = Host.GetComponent(BuildComponentType.LoggingService) as ILoggingService; 83ILoggingService loggingService = Host.GetComponent(BuildComponentType.LoggingService) as ILoggingService; 92INodeManager 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)
26public IBuildComponent CreateInstance(BuildComponentType type)
BackEnd\Node\InProcNode.cs (2)
117_buildRequestEngine = componentHost.GetComponent(BuildComponentType.RequestEngine) as IBuildRequestEngine; 334IRegisteredTaskObjectCache objectCache = (IRegisteredTaskObjectCache)(_componentHost.GetComponent(BuildComponentType.RegisteredTaskObjectCache));
BackEnd\Node\OutOfProcNode.cs (14)
152_buildRequestEngine = (this as IBuildComponentHost).GetComponent(BuildComponentType.RequestEngine) as IBuildRequestEngine; 153_globalConfigCache = (this as IBuildComponentHost).GetComponent(BuildComponentType.ConfigCache) as IConfigCache; 154_taskHostNodeManager = (this as IBuildComponentHost).GetComponent(BuildComponentType.TaskHostNodeManager) as INodeManager; 158((IBuildComponentHost)this).RegisterFactory(BuildComponentType.SdkResolverService, sdkResolverServiceFactory.CreateInstance); 159_sdkResolverService = (this as IBuildComponentHost).GetComponent(BuildComponentType.SdkResolverService) as ISdkResolverService; 163BuildComponentType.FileAccessManager, 292void IBuildComponentHost.RegisterFactory(BuildComponentType factoryType, BuildComponentFactoryDelegate factory) 302IBuildComponent IBuildComponentHost.GetComponent(BuildComponentType type) 307TComponent IBuildComponentHost.GetComponent<TComponent>(BuildComponentType type) 473IRegisteredTaskObjectCache objectCache = (IRegisteredTaskObjectCache)(_componentFactories.GetComponent(BuildComponentType.RegisteredTaskObjectCache)); 546if (_componentFactories.GetComponent(BuildComponentType.ConfigCache) is IConfigCache configCache) 551if (_componentFactories.GetComponent(BuildComponentType.ResultsCache) is IResultsCache resultsCache) 766_componentFactories.ReplaceFactory(BuildComponentType.LoggingService, loggingServiceFactory.CreateInstance); 768_loggingService = _componentFactories.GetComponent(BuildComponentType.LoggingService) as ILoggingService;
BackEnd\Shared\BuildRequestConfiguration.cs (1)
468ISdkResolverService sdkResolverService = componentHost.GetComponent(BuildComponentType.SdkResolverService) as ISdkResolverService;
BuildCheck\Infrastructure\BuildCheckManagerProvider.cs (2)
34internal static IBuildComponent CreateComponent(BuildComponentType type) 36ErrorUtilities.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 (2)
263_taskHostProvider = (NodeProviderOutOfProcTaskHost)_buildComponentHost.GetComponent(BuildComponentType.OutOfProcTaskHostNodeProvider); 453IFileAccessManager fileAccessManager = ((IFileAccessManager)_buildComponentHost.GetComponent(BuildComponentType.FileAccessManager));
TelemetryInfra\TelemetryForwarderProvider.cs (2)
22internal static IBuildComponent CreateComponent(BuildComponentType type) 24ErrorUtilities.VerifyThrow(type == BuildComponentType.TelemetryForwarder, "Cannot create components of type {0}", type);
Microsoft.Build.Engine.UnitTests (180)
BackEnd\BuildManager_Tests.cs (4)
1921host.GetComponent(BuildComponentType.ConfigCache); 1947host.GetComponent(BuildComponentType.ConfigCache); 1979host.GetComponent(BuildComponentType.ConfigCache); 2031host.GetComponent(BuildComponentType.ConfigCache);
BackEnd\BuildRequestEngine_Tests.cs (5)
287_engine = (IBuildRequestEngine)_host.GetComponent(BuildComponentType.RequestEngine); 288_cache = (IConfigCache)_host.GetComponent(BuildComponentType.ConfigCache); 394MockRequestBuilder builder = (MockRequestBuilder)_host.GetComponent(BuildComponentType.RequestBuilder); 447MockRequestBuilder builder = (MockRequestBuilder)_host.GetComponent(BuildComponentType.RequestBuilder); 513IBuildRequestEngine engine = (IBuildRequestEngine)_host.GetComponent(BuildComponentType.RequestEngine);
BackEnd\LoggingService_Tests.cs (1)
965ConfigCache configCache = host.GetComponent(BuildComponentType.ConfigCache) as ConfigCache;
BackEnd\LoggingServiceFactory_Tests.cs (2)
24LoggingService loggingService = (LoggingService)factory.CreateInstance(BuildComponentType.LoggingService); 35LoggingService loggingService = (LoggingService)factory.CreateInstance(BuildComponentType.LoggingService);
BackEnd\LoggingServicesLogMethod_Tests.cs (5)
838ConfigCache cache = (ConfigCache)componentHost.GetComponent(BuildComponentType.ConfigCache); 864ConfigCache cache = (ConfigCache)componentHost.GetComponent(BuildComponentType.ConfigCache); 903ConfigCache cache = (ConfigCache)componentHost.GetComponent(BuildComponentType.ConfigCache); 944ConfigCache cache = (ConfigCache)componentHost.GetComponent(BuildComponentType.ConfigCache); 1417ConfigCache cache = (ConfigCache)componentHost.GetComponent(BuildComponentType.ConfigCache);
BackEnd\MockHost.cs (12)
198public IBuildComponent GetComponent(BuildComponentType type) 202BuildComponentType.ConfigCache => (IBuildComponent)_configCache, 203BuildComponentType.LoggingService => (IBuildComponent)_loggingService, 204BuildComponentType.RequestEngine => (IBuildComponent)_requestEngine, 205BuildComponentType.TargetBuilder => (IBuildComponent)_targetBuilder, 206BuildComponentType.ResultsCache => (IBuildComponent)_resultsCache, 207BuildComponentType.RequestBuilder => (IBuildComponent)_requestBuilder, 208BuildComponentType.SdkResolverService => (IBuildComponent)_sdkResolverService, 209BuildComponentType.BuildCheckManagerProvider => (IBuildComponent)_buildCheckManagerProvider, 210BuildComponentType.TelemetryForwarder => (IBuildComponent)_telemetryForwarder, 215public TComponent GetComponent<TComponent>(BuildComponentType type) where TComponent : IBuildComponent 221public void RegisterFactory(BuildComponentType type, BuildComponentFactoryDelegate factory)
BackEnd\NodeEndpointInProc_Tests.cs (3)
78public IBuildComponent GetComponent(BuildComponentType type) 83public TComponent GetComponent<TComponent>(BuildComponentType type) where TComponent : IBuildComponent => throw new NotImplementedException("Not expected to be used."); 85public void RegisterFactory(BuildComponentType type, BuildComponentFactoryDelegate factory)
BackEnd\RequestBuilder_Tests.cs (12)
61_requestBuilder = (IRequestBuilder)_host.GetComponent(BuildComponentType.RequestBuilder); 83TestTargetBuilder targetBuilder = (TestTargetBuilder)_host.GetComponent(BuildComponentType.TargetBuilder); 84IConfigCache configCache = (IConfigCache)_host.GetComponent(BuildComponentType.ConfigCache); 113TestTargetBuilder targetBuilder = (TestTargetBuilder)_host.GetComponent(BuildComponentType.TargetBuilder); 114IConfigCache configCache = (IConfigCache)_host.GetComponent(BuildComponentType.ConfigCache); 146TestTargetBuilder targetBuilder = (TestTargetBuilder)_host.GetComponent(BuildComponentType.TargetBuilder); 147IConfigCache configCache = (IConfigCache)_host.GetComponent(BuildComponentType.ConfigCache); 185TestTargetBuilder targetBuilder = (TestTargetBuilder)_host.GetComponent(BuildComponentType.TargetBuilder); 186IConfigCache configCache = (IConfigCache)_host.GetComponent(BuildComponentType.ConfigCache); 224TestTargetBuilder targetBuilder = (TestTargetBuilder)_host.GetComponent(BuildComponentType.TargetBuilder); 225IConfigCache configCache = (IConfigCache)_host.GetComponent(BuildComponentType.ConfigCache); 300IConfigCache configCache = (IConfigCache)_host.GetComponent(BuildComponentType.ConfigCache);
BackEnd\Scheduler_Tests.cs (7)
67NodeProviderInProc nodeProviderInProc = ((IBuildComponentHost)BuildManager.DefaultBuildManager).GetComponent(BuildComponentType.InProcNodeProvider) as NodeProviderInProc; 94NodeProviderInProc nodeProviderInProc = ((IBuildComponentHost)_buildManager).GetComponent(BuildComponentType.InProcNodeProvider) as NodeProviderInProc; 374NodeProviderInProc nodeProviderInProc = ((IBuildComponentHost)BuildManager.DefaultBuildManager).GetComponent(BuildComponentType.InProcNodeProvider) as NodeProviderInProc; 568NodeProviderInProc nodeProviderInProc = ((IBuildComponentHost)BuildManager.DefaultBuildManager).GetComponent(BuildComponentType.InProcNodeProvider) as NodeProviderInProc; 612Assert.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)
260((IBuildComponentHost)_buildManager).RegisterFactory(BuildComponentType.SdkResolverService, type =>
BackEnd\TargetBuilder_Tests.cs (90)
101TargetBuilder builder = (TargetBuilder)_host.GetComponent(BuildComponentType.TargetBuilder); 102IConfigCache cache = (IConfigCache)_host.GetComponent(BuildComponentType.ConfigCache); 121TargetBuilder builder = (TargetBuilder)_host.GetComponent(BuildComponentType.TargetBuilder); 122IConfigCache cache = (IConfigCache)_host.GetComponent(BuildComponentType.ConfigCache); 134IResultsCache resultsCache = (IResultsCache)_host.GetComponent(BuildComponentType.ResultsCache); 148TargetBuilder builder = (TargetBuilder)_host.GetComponent(BuildComponentType.TargetBuilder); 149IConfigCache cache = (IConfigCache)_host.GetComponent(BuildComponentType.ConfigCache); 157IResultsCache resultsCache = (IResultsCache)_host.GetComponent(BuildComponentType.ResultsCache); 174TargetBuilder builder = (TargetBuilder)_host.GetComponent(BuildComponentType.TargetBuilder); 175MockTaskBuilder taskBuilder = (MockTaskBuilder)_host.GetComponent(BuildComponentType.TaskBuilder); 178IConfigCache cache = (IConfigCache)_host.GetComponent(BuildComponentType.ConfigCache); 190IResultsCache resultsCache = (IResultsCache)_host.GetComponent(BuildComponentType.ResultsCache); 362TargetBuilder builder = (TargetBuilder)_host.GetComponent(BuildComponentType.TargetBuilder); 363IConfigCache cache = (IConfigCache)_host.GetComponent(BuildComponentType.ConfigCache); 502TargetBuilder builder = (TargetBuilder)_host.GetComponent(BuildComponentType.TargetBuilder); 503IConfigCache cache = (IConfigCache)_host.GetComponent(BuildComponentType.ConfigCache); 528TargetBuilder builder = (TargetBuilder)_host.GetComponent(BuildComponentType.TargetBuilder); 529IConfigCache cache = (IConfigCache)_host.GetComponent(BuildComponentType.ConfigCache); 554TargetBuilder builder = (TargetBuilder)_host.GetComponent(BuildComponentType.TargetBuilder); 555IConfigCache cache = (IConfigCache)_host.GetComponent(BuildComponentType.ConfigCache); 579MockTaskBuilder taskBuilder = (MockTaskBuilder)_host.GetComponent(BuildComponentType.TaskBuilder); 584TargetBuilder builder = (TargetBuilder)_host.GetComponent(BuildComponentType.TargetBuilder); 585IConfigCache cache = (IConfigCache)_host.GetComponent(BuildComponentType.ConfigCache); 614MockTaskBuilder taskBuilder = (MockTaskBuilder)_host.GetComponent(BuildComponentType.TaskBuilder); 619TargetBuilder builder = (TargetBuilder)_host.GetComponent(BuildComponentType.TargetBuilder); 620IConfigCache cache = (IConfigCache)_host.GetComponent(BuildComponentType.ConfigCache); 651TargetBuilder builder = (TargetBuilder)_host.GetComponent(BuildComponentType.TargetBuilder); 652IConfigCache cache = (IConfigCache)_host.GetComponent(BuildComponentType.ConfigCache); 682TargetBuilder builder = (TargetBuilder)_host.GetComponent(BuildComponentType.TargetBuilder); 683IConfigCache cache = (IConfigCache)_host.GetComponent(BuildComponentType.ConfigCache); 708TargetBuilder builder = (TargetBuilder)_host.GetComponent(BuildComponentType.TargetBuilder); 709IConfigCache cache = (IConfigCache)_host.GetComponent(BuildComponentType.ConfigCache); 744TargetBuilder builder = (TargetBuilder)_host.GetComponent(BuildComponentType.TargetBuilder); 745IConfigCache cache = (IConfigCache)_host.GetComponent(BuildComponentType.ConfigCache); 770TargetBuilder builder = (TargetBuilder)_host.GetComponent(BuildComponentType.TargetBuilder); 771IConfigCache cache = (IConfigCache)_host.GetComponent(BuildComponentType.ConfigCache); 797TargetBuilder builder = (TargetBuilder)_host.GetComponent(BuildComponentType.TargetBuilder); 798IConfigCache cache = (IConfigCache)_host.GetComponent(BuildComponentType.ConfigCache); 822MockTaskBuilder taskBuilder = (MockTaskBuilder)_host.GetComponent(BuildComponentType.TaskBuilder); 827TargetBuilder builder = (TargetBuilder)_host.GetComponent(BuildComponentType.TargetBuilder); 828IConfigCache cache = (IConfigCache)_host.GetComponent(BuildComponentType.ConfigCache); 866MockTaskBuilder taskBuilder = (MockTaskBuilder)_host.GetComponent(BuildComponentType.TaskBuilder); 871TargetBuilder builder = (TargetBuilder)_host.GetComponent(BuildComponentType.TargetBuilder); 872IConfigCache cache = (IConfigCache)_host.GetComponent(BuildComponentType.ConfigCache); 898TargetBuilder builder = (TargetBuilder)_host.GetComponent(BuildComponentType.TargetBuilder); 899IConfigCache cache = (IConfigCache)_host.GetComponent(BuildComponentType.ConfigCache); 925TargetBuilder builder = (TargetBuilder)_host.GetComponent(BuildComponentType.TargetBuilder); 926IConfigCache cache = (IConfigCache)_host.GetComponent(BuildComponentType.ConfigCache); 957TargetBuilder builder = (TargetBuilder)_host.GetComponent(BuildComponentType.TargetBuilder); 958IConfigCache cache = (IConfigCache)_host.GetComponent(BuildComponentType.ConfigCache); 1055TargetBuilder builder = (TargetBuilder)_host.GetComponent(BuildComponentType.TargetBuilder); 1056IConfigCache cache = (IConfigCache)_host.GetComponent(BuildComponentType.ConfigCache); 1090TargetBuilder builder = (TargetBuilder)_host.GetComponent(BuildComponentType.TargetBuilder); 1091IConfigCache cache = (IConfigCache)_host.GetComponent(BuildComponentType.ConfigCache); 1141TargetBuilder builder = (TargetBuilder)_host.GetComponent(BuildComponentType.TargetBuilder); 1142IConfigCache cache = (IConfigCache)_host.GetComponent(BuildComponentType.ConfigCache); 1201TargetBuilder builder = (TargetBuilder)_host.GetComponent(BuildComponentType.TargetBuilder); 1202IConfigCache cache = (IConfigCache)_host.GetComponent(BuildComponentType.ConfigCache); 1238MockTaskBuilder taskBuilder = (MockTaskBuilder)_host.GetComponent(BuildComponentType.TaskBuilder); 1243TargetBuilder builder = (TargetBuilder)_host.GetComponent(BuildComponentType.TargetBuilder); 1244IConfigCache cache = (IConfigCache)_host.GetComponent(BuildComponentType.ConfigCache); 1289TargetBuilder builder = (TargetBuilder)_host.GetComponent(BuildComponentType.TargetBuilder); 1290IConfigCache cache = (IConfigCache)_host.GetComponent(BuildComponentType.ConfigCache); 1320TargetBuilder builder = (TargetBuilder)_host.GetComponent(BuildComponentType.TargetBuilder); 1321IConfigCache cache = (IConfigCache)_host.GetComponent(BuildComponentType.ConfigCache); 1394TargetBuilder builder = (TargetBuilder)_host.GetComponent(BuildComponentType.TargetBuilder); 1395IConfigCache cache = (IConfigCache)_host.GetComponent(BuildComponentType.ConfigCache); 1423TargetBuilder builder = (TargetBuilder)_host.GetComponent(BuildComponentType.TargetBuilder); 1424MockTaskBuilder taskBuilder = (MockTaskBuilder)_host.GetComponent(BuildComponentType.TaskBuilder); 1428IConfigCache cache = (IConfigCache)_host.GetComponent(BuildComponentType.ConfigCache); 1434IResultsCache resultsCache = (IResultsCache)_host.GetComponent(BuildComponentType.ResultsCache); 1451TargetBuilder builder = (TargetBuilder)_host.GetComponent(BuildComponentType.TargetBuilder); 1452MockTaskBuilder taskBuilder = (MockTaskBuilder)_host.GetComponent(BuildComponentType.TaskBuilder); 1455IConfigCache cache = (IConfigCache)_host.GetComponent(BuildComponentType.ConfigCache); 1460IResultsCache resultsCache = (IResultsCache)_host.GetComponent(BuildComponentType.ResultsCache); 1544MockTaskBuilder mockBuilder = (MockTaskBuilder)_host.GetComponent(BuildComponentType.TaskBuilder); 1674IConfigCache cache = (IConfigCache)_host.GetComponent(BuildComponentType.ConfigCache); 1706MockTaskBuilder taskBuilder = (MockTaskBuilder)_host.GetComponent(BuildComponentType.TaskBuilder); 1709TargetBuilder builder = (TargetBuilder)_host.GetComponent(BuildComponentType.TargetBuilder); 1710IConfigCache cache = (IConfigCache)_host.GetComponent(BuildComponentType.ConfigCache); 1844public IBuildComponent GetComponent(BuildComponentType type) 1848BuildComponentType.ConfigCache => (IBuildComponent)_configCache, 1849BuildComponentType.LoggingService => (IBuildComponent)_loggingService, 1850BuildComponentType.ResultsCache => (IBuildComponent)_resultsCache, 1851BuildComponentType.RequestBuilder => (IBuildComponent)_requestBuilder, 1852BuildComponentType.TaskBuilder => (IBuildComponent)_taskBuilder, 1853BuildComponentType.TargetBuilder => (IBuildComponent)_targetBuilder, 1854BuildComponentType.SdkResolverService => (IBuildComponent)_sdkResolverService, 1859public TComponent GetComponent<TComponent>(BuildComponentType type) where TComponent : IBuildComponent 1865public void RegisterFactory(BuildComponentType type, BuildComponentFactoryDelegate factory)
BackEnd\TargetEntry_Tests.cs (24)
208MockTaskBuilder taskBuilder = (MockTaskBuilder)_host.GetComponent(BuildComponentType.TaskBuilder); 253MockTaskBuilder taskBuilder = (MockTaskBuilder)_host.GetComponent(BuildComponentType.TaskBuilder); 321MockTaskBuilder taskBuilder = (MockTaskBuilder)_host.GetComponent(BuildComponentType.TaskBuilder); 353MockTaskBuilder taskBuilder = (MockTaskBuilder)_host.GetComponent(BuildComponentType.TaskBuilder); 462MockTaskBuilder taskBuilder = (MockTaskBuilder)_host.GetComponent(BuildComponentType.TaskBuilder); 489MockTaskBuilder taskBuilder = (MockTaskBuilder)_host.GetComponent(BuildComponentType.TaskBuilder); 507MockTaskBuilder taskBuilder = (MockTaskBuilder)_host.GetComponent(BuildComponentType.TaskBuilder); 528MockTaskBuilder taskBuilder = (MockTaskBuilder)_host.GetComponent(BuildComponentType.TaskBuilder); 549MockTaskBuilder taskBuilder = (MockTaskBuilder)_host.GetComponent(BuildComponentType.TaskBuilder); 570MockTaskBuilder taskBuilder = (MockTaskBuilder)_host.GetComponent(BuildComponentType.TaskBuilder); 591MockTaskBuilder taskBuilder = (MockTaskBuilder)_host.GetComponent(BuildComponentType.TaskBuilder); 612MockTaskBuilder taskBuilder = (MockTaskBuilder)_host.GetComponent(BuildComponentType.TaskBuilder); 834NodeProviderInProc nodeProviderInProc = ((IBuildComponentHost)BuildManager.DefaultBuildManager).GetComponent(BuildComponentType.InProcNodeProvider) as NodeProviderInProc; 893NodeProviderInProc inProcNodeProvider = ((IBuildComponentHost)manager).GetComponent(BuildComponentType.InProcNodeProvider) as NodeProviderInProc; 1002ITaskBuilder taskBuilder = _host.GetComponent(BuildComponentType.TaskBuilder) as ITaskBuilder; 1315public IBuildComponent GetComponent(BuildComponentType type) 1319BuildComponentType.ConfigCache => (IBuildComponent)_configCache, 1320BuildComponentType.LoggingService => (IBuildComponent)_loggingService, 1321BuildComponentType.ResultsCache => (IBuildComponent)_resultsCache, 1322BuildComponentType.RequestBuilder => (IBuildComponent)_requestBuilder, 1323BuildComponentType.TaskBuilder => (IBuildComponent)_taskBuilder, 1324BuildComponentType.SdkResolverService => (IBuildComponent)_sdkResolverService, 1329public TComponent GetComponent<TComponent>(BuildComponentType type) where TComponent : IBuildComponent 1335public void RegisterFactory(BuildComponentType type, BuildComponentFactoryDelegate factory)
BackEnd\TaskBuilder_Tests.cs (9)
1286public IBuildComponent GetComponent(BuildComponentType type) 1290BuildComponentType.ConfigCache => (IBuildComponent)_configCache, 1291BuildComponentType.LoggingService => (IBuildComponent)_loggingService, 1292BuildComponentType.ResultsCache => (IBuildComponent)_resultsCache, 1293BuildComponentType.RequestBuilder => (IBuildComponent)_requestBuilder, 1294BuildComponentType.TargetBuilder => (IBuildComponent)_targetBuilder, 1295BuildComponentType.SdkResolverService => (IBuildComponent)_sdkResolverService, 1300public TComponent GetComponent<TComponent>(BuildComponentType type) where TComponent : IBuildComponent 1306public void RegisterFactory(BuildComponentType type, BuildComponentFactoryDelegate factory)
BackEnd\TaskHost_Tests.cs (1)
66_loggingService = loggingFactory.CreateInstance(BuildComponentType.LoggingService) as LoggingService;
Construction\SolutionProjectGenerator_Tests.cs (4)
2190NodeProviderInProc nodeProviderInProc = ((IBuildComponentHost)BuildManager.DefaultBuildManager).GetComponent(BuildComponentType.InProcNodeProvider) as NodeProviderInProc; 2217NodeProviderInProc nodeProviderInProc = ((IBuildComponentHost)buildManager).GetComponent(BuildComponentType.InProcNodeProvider) as NodeProviderInProc; 2278NodeProviderInProc nodeProviderInProc = ((IBuildComponentHost)BuildManager.DefaultBuildManager).GetComponent(BuildComponentType.InProcNodeProvider) as NodeProviderInProc; 2305NodeProviderInProc nodeProviderInProc = ((IBuildComponentHost)buildManager).GetComponent(BuildComponentType.InProcNodeProvider) as NodeProviderInProc;