7 implementations of IBuildComponentHost
Microsoft.Build (2)
BackEnd\BuildManager\BuildManager.cs (1)
49public class BuildManager : INodePacketHandler, IBuildComponentHost, IDisposable
BackEnd\Node\OutOfProcNode.cs (1)
30public class OutOfProcNode : INode, IBuildComponentHost, INodePacketFactory, INodePacketHandler
Microsoft.Build.Engine.UnitTests (5)
BackEnd\MockHost.cs (1)
21internal sealed class MockHost : MockLoggingService, IBuildComponentHost, IBuildComponent
BackEnd\NodeEndpointInProc_Tests.cs (1)
23private sealed class MockHost : IBuildComponentHost, INodePacketFactory
BackEnd\TargetBuilder_Tests.cs (1)
1720private sealed class MockHost : MockLoggingService, IBuildComponentHost, IBuildComponent
BackEnd\TargetEntry_Tests.cs (1)
1199private sealed class MockHost : MockLoggingService, IBuildComponentHost, IBuildComponent
BackEnd\TaskBuilder_Tests.cs (1)
1254private sealed class MockHost : MockLoggingService, IBuildComponentHost, IBuildComponent
150 references to IBuildComponentHost
Microsoft.Build (118)
BackEnd\BuildManager\BuildManager.cs (36)
367private ISdkResolverService SdkResolverService => ((this as IBuildComponentHost).GetComponent(BuildComponentType.SdkResolverService) as ISdkResolverService)!; 373ILoggingService IBuildComponentHost.LoggingService => _componentFactories.GetComponent<ILoggingService>(BuildComponentType.LoggingService); 378string IBuildComponentHost.Name => _hostName; 384BuildParameters? IBuildComponentHost.BuildParameters => _buildParameters; 389LegacyThreadingData IBuildComponentHost.LegacyThreadingData => _legacyThreadingData; 562_nodeManager = ((IBuildComponentHost)this).GetComponent(BuildComponentType.NodeManager) as INodeManager; 581var fileAccessManager = ((IBuildComponentHost)this).GetComponent<IFileAccessManager>(BuildComponentType.FileAccessManager); 593_taskHostNodeManager = ((IBuildComponentHost)this).GetComponent<INodeManager>(BuildComponentType.TaskHostNodeManager); 594_scheduler = ((IBuildComponentHost)this).GetComponent<IScheduler>(BuildComponentType.Scheduler); 685_configCache = ((IBuildComponentHost)this).GetComponent<IConfigCache>(BuildComponentType.ConfigCache); 686_resultsCache = ((IBuildComponentHost)this).GetComponent<IResultsCache>(BuildComponentType.ResultsCache); 778ILoggingService loggingService = ((IBuildComponentHost)this).LoggingService; 832_configCache = ((IBuildComponentHost)this).GetComponent<IConfigCache>(BuildComponentType.ConfigCache); 833_resultsCache = ((IBuildComponentHost)this).GetComponent<IResultsCache>(BuildComponentType.ResultsCache); 853_configCache = ((IBuildComponentHost)this).GetComponent(BuildComponentType.ConfigCache) as IConfigCache; 1032ILoggingService? loggingService = ((IBuildComponentHost)this).LoggingService; 1164_nodeManager ??= (INodeManager)((IBuildComponentHost)this).GetComponent(BuildComponentType.NodeManager); 1204void IBuildComponentHost.RegisterFactory(BuildComponentType componentType, BuildComponentFactoryDelegate factory) 1214IBuildComponent IBuildComponentHost.GetComponent(BuildComponentType type) 1219TComponent IBuildComponentHost.GetComponent<TComponent>(BuildComponentType type) 1395((IBuildComponentHost)this).LoggingService.LogBuildEvent(submissionStartedEvent); 1481((IBuildComponentHost)this).LoggingService, 1736((IBuildComponentHost)this).LoggingService.LogInvalidProjectFileError(buildEventContext, projectException); 1754((LoggingService)((IBuildComponentHost)this).LoggingService).WaitForLoggingToProcessEvents(); 1845((IBuildComponentHost)this).LoggingService.LogInvalidProjectFileError(projectBuildEventContext, projectException); 1861((IBuildComponentHost)this).LoggingService.LogFatalBuildError(buildEventContext, ex, new BuildEventFileInfo(submission.BuildRequestData.ProjectFullPath)); 1913((IBuildComponentHost)this).LoggingService, 2474ILoggingService loggingService = ((IBuildComponentHost)this).GetComponent<ILoggingService>(BuildComponentType.LoggingService); 2487ILoggingService loggingService = ((IBuildComponentHost)this).GetComponent<ILoggingService>(BuildComponentType.LoggingService); 2527((FileAccessManager)((IBuildComponentHost)this).GetComponent(BuildComponentType.FileAccessManager)).ReportFileAccess(fileAccessReport.FileAccessData, nodeId); 2542((FileAccessManager)((IBuildComponentHost)this).GetComponent(BuildComponentType.FileAccessManager)).ReportProcess(processReport.ProcessData, nodeId); 2634((IBuildComponentHost)this).LoggingService.LogError(buildEventContext, new BuildEventFileInfo(String.Empty), "UnableToCreateNode", response.RequiredNodeType.ToString("G")); 2761ILoggingService loggingService = ((IBuildComponentHost)this).GetComponent<ILoggingService>(BuildComponentType.LoggingService); 2925((IBuildComponentHost)this).GetComponent(BuildComponentType.BuildCheckManagerProvider) as IBuildCheckManagerProvider; 3217var loggingService = ((IBuildComponentHost)this).LoggingService; 3224var loggingService = ((IBuildComponentHost)this).LoggingService;
BackEnd\BuildManager\BuildSubmission.cs (2)
184LegacyThreadingData legacyThreadingData = ((IBuildComponentHost)BuildManager).LegacyThreadingData; 240((IBuildComponentHost)BuildManager).LoggingService.HasBuildSubmissionLoggedErrors(BuildResult.SubmissionId))
BackEnd\Components\BuildComponentFactoryCollection.cs (3)
28private readonly IBuildComponentHost _host; 33public BuildComponentFactoryCollection(IBuildComponentHost host) 218public IBuildComponent GetInstance(IBuildComponentHost host)
BackEnd\Components\BuildRequestEngine\BuildRequestEngine.cs (2)
56private IBuildComponentHost _componentHost; 591public void InitializeComponent(IBuildComponentHost host)
BackEnd\Components\Caching\ConfigCache.cs (1)
342public void InitializeComponent(IBuildComponentHost host)
BackEnd\Components\Caching\ConfigCacheWithOverride.cs (1)
24public void InitializeComponent(IBuildComponentHost host)
BackEnd\Components\Caching\RegisteredTaskObjectCache.cs (1)
30public void InitializeComponent(IBuildComponentHost host)
BackEnd\Components\Caching\ResultsCache.cs (1)
282public void InitializeComponent(IBuildComponentHost host)
BackEnd\Components\Caching\ResultsCacheWithOverride.cs (1)
25public void InitializeComponent(IBuildComponentHost host)
BackEnd\Components\Communications\DetouredNodeLauncher.cs (1)
38public void InitializeComponent(IBuildComponentHost host)
BackEnd\Components\Communications\NodeEndpointInProc.cs (3)
52private IBuildComponentHost _componentHost; 102private NodeEndpointInProc(EndpointMode commMode, IBuildComponentHost host) 240internal static EndpointPair CreateInProcEndpoints(EndpointMode mode, IBuildComponentHost host)
BackEnd\Components\Communications\NodeLauncher.cs (1)
27public void InitializeComponent(IBuildComponentHost host)
BackEnd\Components\Communications\NodeManager.cs (2)
32private IBuildComponentHost? _componentHost; 169public void InitializeComponent(IBuildComponentHost host)
BackEnd\Components\Communications\NodeProviderInProc.cs (2)
46private IBuildComponentHost _componentHost; 134public void InitializeComponent(IBuildComponentHost host)
BackEnd\Components\Communications\NodeProviderOutOfProc.cs (1)
177public void InitializeComponent(IBuildComponentHost host)
BackEnd\Components\Communications\NodeProviderOutOfProcBase.cs (2)
62private IBuildComponentHost _componentHost; 85protected IBuildComponentHost ComponentHost
BackEnd\Components\Communications\NodeProviderOutOfProcTaskHost.cs (1)
225public void InitializeComponent(IBuildComponentHost host)
BackEnd\Components\Communications\TaskHostNodeManager.cs (2)
28private IBuildComponentHost _componentHost; 87public void InitializeComponent(IBuildComponentHost host)
BackEnd\Components\FileAccesses\FileAccessManager.cs (1)
43public void InitializeComponent(IBuildComponentHost host)
BackEnd\Components\FileAccesses\OutOfProcNodeFileAccessManager.cs (1)
32public void InitializeComponent(IBuildComponentHost host)
BackEnd\Components\IBuildComponent.cs (1)
18void InitializeComponent(IBuildComponentHost host);
BackEnd\Components\Logging\LoggingService.cs (2)
162private IBuildComponentHost _componentHost; 852public void InitializeComponent(IBuildComponentHost buildComponentHost)
BackEnd\Components\ProjectCache\ProjectCacheService.cs (1)
37private readonly IBuildComponentHost _componentHost;
BackEnd\Components\RequestBuilder\RequestBuilder.cs (4)
79private IBuildComponentHost _componentHost; 551public void InitializeComponent(IBuildComponentHost host) 571internal static bool IsBuilderUsingLegacyThreadingSemantics(IBuildComponentHost host, BuildRequestEntry entry) 664IBuildComponentHost componentHostSnapshot = _componentHost;
BackEnd\Components\RequestBuilder\TargetBuilder.cs (2)
56private IBuildComponentHost _componentHost; 213public void InitializeComponent(IBuildComponentHost host)
BackEnd\Components\RequestBuilder\TargetEntry.cs (2)
129private IBuildComponentHost _host; 174IBuildComponentHost host,
BackEnd\Components\RequestBuilder\TaskBuilder.cs (2)
78private IBuildComponentHost _componentHost; 198public void InitializeComponent(IBuildComponentHost host)
BackEnd\Components\RequestBuilder\TaskHost.cs (3)
50private IBuildComponentHost _host; 115public TaskHost(IBuildComponentHost host, BuildRequestEntry requestEntry, ElementLocation taskLocation, ITargetBuilderCallback targetBuilderCallback) 949IBuildComponentHost buildComponentHost = _taskHost._host;
BackEnd\Components\Scheduler\Scheduler.cs (2)
121private IBuildComponentHost _componentHost; 628public void InitializeComponent(IBuildComponentHost host)
BackEnd\Components\SdkResolution\HostedSdkResolverServiceBase.cs (4)
15/// A base class for "hosted" ISdkResolverService implementations which are registered by an <see cref="IBuildComponentHost"/>. 25/// The current <see cref="IBuildComponentHost"/> which is hosting this component. 27protected IBuildComponentHost Host; 42public virtual void InitializeComponent(IBuildComponentHost host)
BackEnd\Components\SdkResolution\MainNodeSdkResolverService.cs (2)
25/// must have access to an <see cref="IBuildComponentHost"/> and call <see cref="IBuildComponentHost.GetComponent"/> and pass <see cref="BuildComponentType.SdkResolverService"/>.
BackEnd\Components\SdkResolution\OutOfProcNodeSdkResolverService.cs (2)
25/// must have access to an <see cref="IBuildComponentHost"/> and call <see cref="IBuildComponentHost.GetComponent"/> and pass <see cref="BuildComponentType.SdkResolverService"/>.
BackEnd\Node\InProcNode.cs (2)
29private readonly IBuildComponentHost _componentHost; 109public InProcNode(IBuildComponentHost componentHost, INodeEndpoint inProcNodeEndpoint)
BackEnd\Node\OutOfProcNode.cs (14)
151_buildRequestEngine = (this as IBuildComponentHost).GetComponent(BuildComponentType.RequestEngine) as IBuildRequestEngine; 152_globalConfigCache = (this as IBuildComponentHost).GetComponent(BuildComponentType.ConfigCache) as IConfigCache; 153_taskHostNodeManager = (this as IBuildComponentHost).GetComponent(BuildComponentType.TaskHostNodeManager) as INodeManager; 157((IBuildComponentHost)this).RegisterFactory(BuildComponentType.SdkResolverService, sdkResolverServiceFactory.CreateInstance); 158_sdkResolverService = (this as IBuildComponentHost).GetComponent(BuildComponentType.SdkResolverService) as ISdkResolverService; 161((IBuildComponentHost)this).RegisterFactory( 191ILoggingService IBuildComponentHost.LoggingService => _loggingService; 196LegacyThreadingData IBuildComponentHost.LegacyThreadingData => _legacyThreadingData; 201string IBuildComponentHost.Name => "OutOfProc"; 207BuildParameters IBuildComponentHost.BuildParameters => _buildParameters; 291void IBuildComponentHost.RegisterFactory(BuildComponentType factoryType, BuildComponentFactoryDelegate factory) 301IBuildComponent IBuildComponentHost.GetComponent(BuildComponentType type) 306TComponent IBuildComponentHost.GetComponent<TComponent>(BuildComponentType type) 307=> (TComponent)((IBuildComponentHost)this).GetComponent(type);
BackEnd\Shared\BuildRequestConfiguration.cs (1)
431IBuildComponentHost componentHost,
BackEnd\TaskExecutionHost\TaskExecutionHost.cs (2)
152private readonly IBuildComponentHost _buildComponentHost; 162internal TaskExecutionHost(IBuildComponentHost host)
BuildCheck\Infrastructure\BuildCheckManagerProvider.cs (1)
40public void InitializeComponent(IBuildComponentHost host)
BuildCheck\Infrastructure\BuildCheckReplayModeConnector.cs (1)
34var buildCheckManagerProvider = ((IBuildComponentHost)buildManager)
BuildCheck\Infrastructure\NullBuildCheckManagerProvider.cs (1)
21public void InitializeComponent(IBuildComponentHost host) { }
Definition\ProjectCollection.cs (1)
1510void IBuildComponent.InitializeComponent(IBuildComponentHost host)
Instance\TaskFactories\AssemblyTaskFactory.cs (1)
316internal ITask CreateTaskInstance(ElementLocation taskLocation, TaskLoggingContext taskLoggingContext, IBuildComponentHost buildComponentHost, IDictionary<string, string> taskIdentityParameters,
Instance\TaskFactories\TaskHostTask.cs (2)
53private IBuildComponentHost _buildComponentHost; 133IBuildComponentHost buildComponentHost,
Microsoft.Build.Engine.UnitTests (32)
BackEnd\BuildManager_Tests.cs (4)
1921IBuildComponentHost host = _buildManager; 1947IBuildComponentHost host = _buildManager; 1979IBuildComponentHost host = _buildManager; 2031IBuildComponentHost host = _buildManager;
BackEnd\BuildRequestEngine_Tests.cs (2)
56private IBuildComponentHost _host; 226public void InitializeComponent(IBuildComponentHost host)
BackEnd\LoggingService_Tests.cs (2)
97IBuildComponentHost loggingHost = new MockHost(parameters); 954IBuildComponentHost host = new MockHost();
BackEnd\LoggingServicesLogMethod_Tests.cs (2)
1805private ProcessBuildEventHelper(LoggerMode loggerMode, int nodeId, IBuildComponentHost componentHost) 1847public static IBuildComponent CreateLoggingService(LoggerMode mode, int nodeId, IBuildComponentHost componentHost)
BackEnd\MockHost.cs (1)
172LegacyThreadingData IBuildComponentHost.LegacyThreadingData
BackEnd\MockLoggingService.cs (1)
687public void InitializeComponent(IBuildComponentHost host) => throw new NotImplementedException();
BackEnd\MockSdkResolverService.cs (1)
32public void InitializeComponent(IBuildComponentHost host)
BackEnd\MockTaskBuilder.cs (2)
25private IBuildComponentHost _host; 138public void InitializeComponent(IBuildComponentHost host)
BackEnd\NodeEndpointInProc_Tests.cs (1)
53LegacyThreadingData IBuildComponentHost.LegacyThreadingData
BackEnd\RequestBuilder_Tests.cs (2)
342private IBuildComponentHost _host; 406public void InitializeComponent(IBuildComponentHost host)
BackEnd\Scheduler_Tests.cs (4)
68NodeProviderInProc nodeProviderInProc = ((IBuildComponentHost)BuildManager.DefaultBuildManager).GetComponent(BuildComponentType.InProcNodeProvider) as NodeProviderInProc; 95NodeProviderInProc nodeProviderInProc = ((IBuildComponentHost)_buildManager).GetComponent(BuildComponentType.InProcNodeProvider) as NodeProviderInProc; 375NodeProviderInProc nodeProviderInProc = ((IBuildComponentHost)BuildManager.DefaultBuildManager).GetComponent(BuildComponentType.InProcNodeProvider) as NodeProviderInProc; 569NodeProviderInProc nodeProviderInProc = ((IBuildComponentHost)BuildManager.DefaultBuildManager).GetComponent(BuildComponentType.InProcNodeProvider) as NodeProviderInProc;
BackEnd\SdkResultOutOfProc_Tests.cs (1)
273((IBuildComponentHost)_buildManager).RegisterFactory(BuildComponentType.SdkResolverService, type =>
BackEnd\TargetBuilder_Tests.cs (1)
1810LegacyThreadingData IBuildComponentHost.LegacyThreadingData
BackEnd\TargetEntry_Tests.cs (3)
835NodeProviderInProc nodeProviderInProc = ((IBuildComponentHost)BuildManager.DefaultBuildManager).GetComponent(BuildComponentType.InProcNodeProvider) as NodeProviderInProc; 894NodeProviderInProc inProcNodeProvider = ((IBuildComponentHost)manager).GetComponent(BuildComponentType.InProcNodeProvider) as NodeProviderInProc; 1281LegacyThreadingData IBuildComponentHost.LegacyThreadingData
BackEnd\TaskBuilder_Tests.cs (1)
1360LegacyThreadingData IBuildComponentHost.LegacyThreadingData
Construction\SolutionProjectGenerator_Tests.cs (4)
2115NodeProviderInProc nodeProviderInProc = ((IBuildComponentHost)BuildManager.DefaultBuildManager).GetComponent(BuildComponentType.InProcNodeProvider) as NodeProviderInProc; 2142NodeProviderInProc nodeProviderInProc = ((IBuildComponentHost)buildManager).GetComponent(BuildComponentType.InProcNodeProvider) as NodeProviderInProc; 2203NodeProviderInProc nodeProviderInProc = ((IBuildComponentHost)BuildManager.DefaultBuildManager).GetComponent(BuildComponentType.InProcNodeProvider) as NodeProviderInProc; 2230NodeProviderInProc nodeProviderInProc = ((IBuildComponentHost)buildManager).GetComponent(BuildComponentType.InProcNodeProvider) as NodeProviderInProc;