350 references to BuildComponentType
Microsoft.Build (169)
BackEnd\BuildManager\BuildManager.cs (24)
374private ISdkResolverService SdkResolverService => ((this as IBuildComponentHost).GetComponent(BuildComponentType.SdkResolverService) as ISdkResolverService)!; 380ILoggingService 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); 1263void IBuildComponentHost.RegisterFactory(BuildComponentType componentType, BuildComponentFactoryDelegate factory) 1273IBuildComponent IBuildComponentHost.GetComponent(BuildComponentType type) 1278TComponent IBuildComponentHost.GetComponent<TComponent>(BuildComponentType type) 2538ILoggingService loggingService = ((IBuildComponentHost)this).GetComponent<ILoggingService>(BuildComponentType.LoggingService); 2551ILoggingService loggingService = ((IBuildComponentHost)this).GetComponent<ILoggingService>(BuildComponentType.LoggingService); 2725IConfigCache configCache = _componentFactories.GetComponent<IConfigCache>(BuildComponentType.ConfigCache); 2825ILoggingService 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)
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); 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)
286IBuildCheckManagerProvider buildCheckProvider = (_componentHost.GetComponent(BuildComponentType.BuildCheckManagerProvider) as IBuildCheckManagerProvider); 290ITelemetryForwarder telemetryForwarder = (_componentHost.GetComponent(BuildComponentType.TelemetryForwarder) as TelemetryForwarderProvider)!.Instance; 342IResultsCache cache = (IResultsCache)_componentHost.GetComponent(BuildComponentType.ResultsCache); 345BuildRequestConfiguration config = ((IConfigCache)_componentHost.GetComponent(BuildComponentType.ConfigCache))[request.ConfigurationId]; 434IResultsCache resultsCache = (IResultsCache)_componentHost.GetComponent(BuildComponentType.ResultsCache); 435IConfigCache configCache = (IConfigCache)_componentHost.GetComponent(BuildComponentType.ConfigCache); 515IConfigCache globalConfigurations = (IConfigCache)_componentHost.GetComponent(BuildComponentType.ConfigCache); 525IResultsCache resultsCache = (IResultsCache)_componentHost.GetComponent(BuildComponentType.ResultsCache); 599_configCache = (IConfigCache)host.GetComponent(BuildComponentType.ConfigCache); 626internal static IBuildComponent CreateComponent(BuildComponentType type) 628ErrorUtilities.VerifyThrow(type == BuildComponentType.RequestEngine, "Cannot create component of type {0}", type); 881_componentHost.GetComponent(BuildComponentType.ResultsCache) as IResultsCache; 947IRequestBuilder builder = (IRequestBuilder)_componentHost.GetComponent(BuildComponentType.RequestBuilder); 1124IConfigCache globalConfigCache = (IConfigCache)_componentHost.GetComponent(BuildComponentType.ConfigCache); 1215IResultsCache 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\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\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 (3)
620var objectCache = (IRegisteredTaskObjectCache)_host.GetComponent(BuildComponentType.RegisteredTaskObjectCache); 629var objectCache = (IRegisteredTaskObjectCache)_host.GetComponent(BuildComponentType.RegisteredTaskObjectCache); 638var 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); 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 (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; 293void IBuildComponentHost.RegisterFactory(BuildComponentType factoryType, BuildComponentFactoryDelegate factory) 303IBuildComponent IBuildComponentHost.GetComponent(BuildComponentType type) 308TComponent IBuildComponentHost.GetComponent<TComponent>(BuildComponentType type) 474IRegisteredTaskObjectCache objectCache = (IRegisteredTaskObjectCache)(_componentFactories.GetComponent(BuildComponentType.RegisteredTaskObjectCache)); 548if (_componentFactories.GetComponent(BuildComponentType.ConfigCache) is IConfigCache configCache) 553if (_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)
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 (1)
263_taskHostProvider = (NodeProviderOutOfProcTaskHost)_buildComponentHost.GetComponent(BuildComponentType.OutOfProcTaskHostNodeProvider);
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 (181)
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)
293_engine = (IBuildRequestEngine)_host.GetComponent(BuildComponentType.RequestEngine); 294_cache = (IConfigCache)_host.GetComponent(BuildComponentType.ConfigCache); 400MockRequestBuilder builder = (MockRequestBuilder)_host.GetComponent(BuildComponentType.RequestBuilder); 453MockRequestBuilder builder = (MockRequestBuilder)_host.GetComponent(BuildComponentType.RequestBuilder); 519IBuildRequestEngine 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)
273((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 (10)
1240IConfigCache cache = (IConfigCache)_host.GetComponent(BuildComponentType.ConfigCache); 1372public IBuildComponent GetComponent(BuildComponentType type) 1376BuildComponentType.ConfigCache => (IBuildComponent)_configCache, 1377BuildComponentType.LoggingService => (IBuildComponent)_loggingService, 1378BuildComponentType.ResultsCache => (IBuildComponent)_resultsCache, 1379BuildComponentType.RequestBuilder => (IBuildComponent)_requestBuilder, 1380BuildComponentType.TargetBuilder => (IBuildComponent)_targetBuilder, 1381BuildComponentType.SdkResolverService => (IBuildComponent)_sdkResolverService, 1386public TComponent GetComponent<TComponent>(BuildComponentType type) where TComponent : IBuildComponent 1392public 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;