7 implementations of IBuildComponentHost
Microsoft.Build (2)
BackEnd\BuildManager\BuildManager.cs (1)
51public class BuildManager : INodePacketHandler, IBuildComponentHost, IDisposable
BackEnd\Node\OutOfProcNode.cs (1)
32public class OutOfProcNode : INode, IBuildComponentHost, INodePacketFactory, INodePacketHandler
Microsoft.Build.Engine.UnitTests (5)
BackEnd\MockHost.cs (1)
22internal sealed class MockHost : MockLoggingService, IBuildComponentHost, IBuildComponent
BackEnd\NodeEndpointInProc_Tests.cs (1)
22private sealed class MockHost : IBuildComponentHost, INodePacketFactory
BackEnd\TargetBuilder_Tests.cs (1)
1719private sealed class MockHost : MockLoggingService, IBuildComponentHost, IBuildComponent
BackEnd\TargetEntry_Tests.cs (1)
1198private sealed class MockHost : MockLoggingService, IBuildComponentHost, IBuildComponent
BackEnd\TaskBuilder_Tests.cs (1)
1253private sealed class MockHost : MockLoggingService, IBuildComponentHost, IBuildComponent
151 references to IBuildComponentHost
Microsoft.Build (119)
BackEnd\BuildManager\BuildManager.cs (36)
374private ISdkResolverService SdkResolverService => ((this as IBuildComponentHost).GetComponent(BuildComponentType.SdkResolverService) as ISdkResolverService)!; 380ILoggingService IBuildComponentHost.LoggingService => _componentFactories.GetComponent<ILoggingService>(BuildComponentType.LoggingService); 385string IBuildComponentHost.Name => _hostName; 391BuildParameters? IBuildComponentHost.BuildParameters => _buildParameters; 396LegacyThreadingData IBuildComponentHost.LegacyThreadingData => _legacyThreadingData; 570_nodeManager = ((IBuildComponentHost)this).GetComponent(BuildComponentType.NodeManager) as INodeManager; 590var fileAccessManager = ((IBuildComponentHost)this).GetComponent<IFileAccessManager>(BuildComponentType.FileAccessManager); 602_taskHostNodeManager = ((IBuildComponentHost)this).GetComponent<INodeManager>(BuildComponentType.TaskHostNodeManager); 603_scheduler = ((IBuildComponentHost)this).GetComponent<IScheduler>(BuildComponentType.Scheduler); 694_configCache = ((IBuildComponentHost)this).GetComponent<IConfigCache>(BuildComponentType.ConfigCache); 695_resultsCache = ((IBuildComponentHost)this).GetComponent<IResultsCache>(BuildComponentType.ResultsCache); 787ILoggingService loggingService = ((IBuildComponentHost)this).LoggingService; 850_configCache = ((IBuildComponentHost)this).GetComponent<IConfigCache>(BuildComponentType.ConfigCache); 851_resultsCache = ((IBuildComponentHost)this).GetComponent<IResultsCache>(BuildComponentType.ResultsCache); 871_configCache = ((IBuildComponentHost)this).GetComponent(BuildComponentType.ConfigCache) as IConfigCache; 1050ILoggingService? loggingService = ((IBuildComponentHost)this).LoggingService; 1201_nodeManager ??= (INodeManager)((IBuildComponentHost)this).GetComponent(BuildComponentType.NodeManager); 1241void IBuildComponentHost.RegisterFactory(BuildComponentType componentType, BuildComponentFactoryDelegate factory) 1251IBuildComponent IBuildComponentHost.GetComponent(BuildComponentType type) 1256TComponent IBuildComponentHost.GetComponent<TComponent>(BuildComponentType type) 1432((IBuildComponentHost)this).LoggingService.LogBuildEvent(submissionStartedEvent); 1518((IBuildComponentHost)this).LoggingService, 1773((IBuildComponentHost)this).LoggingService.LogInvalidProjectFileError(buildEventContext, projectException); 1791((LoggingService)((IBuildComponentHost)this).LoggingService).WaitForLoggingToProcessEvents(); 1882((IBuildComponentHost)this).LoggingService.LogInvalidProjectFileError(projectBuildEventContext, projectException); 1898((IBuildComponentHost)this).LoggingService.LogFatalBuildError(buildEventContext, ex, new BuildEventFileInfo(submission.BuildRequestData.ProjectFullPath)); 1950((IBuildComponentHost)this).LoggingService, 2516ILoggingService loggingService = ((IBuildComponentHost)this).GetComponent<ILoggingService>(BuildComponentType.LoggingService); 2529ILoggingService loggingService = ((IBuildComponentHost)this).GetComponent<ILoggingService>(BuildComponentType.LoggingService); 2569((FileAccessManager)((IBuildComponentHost)this).GetComponent(BuildComponentType.FileAccessManager)).ReportFileAccess(fileAccessReport.FileAccessData, nodeId); 2584((FileAccessManager)((IBuildComponentHost)this).GetComponent(BuildComponentType.FileAccessManager)).ReportProcess(processReport.ProcessData, nodeId); 2676((IBuildComponentHost)this).LoggingService.LogError(buildEventContext, new BuildEventFileInfo(String.Empty), "UnableToCreateNode", response.RequiredNodeType.ToString("G")); 2803ILoggingService loggingService = ((IBuildComponentHost)this).GetComponent<ILoggingService>(BuildComponentType.LoggingService); 2966((IBuildComponentHost)this).GetComponent(BuildComponentType.BuildCheckManagerProvider) as IBuildCheckManagerProvider; 3277var loggingService = ((IBuildComponentHost)this).LoggingService; 3284var 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)
31private readonly IBuildComponentHost _host; 36public BuildComponentFactoryCollection(IBuildComponentHost host) 222public IBuildComponent GetInstance(IBuildComponentHost host)
BackEnd\Components\BuildRequestEngine\BuildRequestEngine.cs (2)
56private IBuildComponentHost _componentHost; 594public 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)
36public 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)
47private IBuildComponentHost _componentHost; 135public 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)
167private IBuildComponentHost _componentHost; 859public void InitializeComponent(IBuildComponentHost buildComponentHost)
BackEnd\Components\ProjectCache\ProjectCacheService.cs (1)
40private 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; 218public 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)
51private IBuildComponentHost _host; 116public TaskHost(IBuildComponentHost host, BuildRequestEntry requestEntry, ElementLocation taskLocation, ITargetBuilderCallback targetBuilderCallback) 950IBuildComponentHost buildComponentHost = _taskHost._host;
BackEnd\Components\Scheduler\Scheduler.cs (2)
120private IBuildComponentHost _componentHost; 627public 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)
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; 163((IBuildComponentHost)this).RegisterFactory( 193ILoggingService IBuildComponentHost.LoggingService => _loggingService; 198LegacyThreadingData IBuildComponentHost.LegacyThreadingData => _legacyThreadingData; 203string IBuildComponentHost.Name => "OutOfProc"; 209BuildParameters IBuildComponentHost.BuildParameters => _buildParameters; 293void IBuildComponentHost.RegisterFactory(BuildComponentType factoryType, BuildComponentFactoryDelegate factory) 303IBuildComponent IBuildComponentHost.GetComponent(BuildComponentType type) 308TComponent IBuildComponentHost.GetComponent<TComponent>(BuildComponentType type) 309=> (TComponent)((IBuildComponentHost)this).GetComponent(type);
BackEnd\Shared\BuildRequestConfiguration.cs (1)
435IBuildComponentHost componentHost,
BackEnd\TaskExecutionHost\TaskExecutionHost.cs (2)
152private readonly IBuildComponentHost _buildComponentHost; 164internal TaskExecutionHost(IBuildComponentHost host)
BuildCheck\Infrastructure\BuildCheckManagerProvider.cs (1)
40public void InitializeComponent(IBuildComponentHost host)
BuildCheck\Infrastructure\BuildCheckReplayModeConnector.cs (1)
29var buildCheckManagerProvider = ((IBuildComponentHost)buildManager)
BuildCheck\Infrastructure\NullBuildCheckManagerProvider.cs (1)
14public void InitializeComponent(IBuildComponentHost host) { }
Definition\ProjectCollection.cs (1)
1515void 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)
55private IBuildComponentHost _buildComponentHost; 135IBuildComponentHost buildComponentHost,
TelemetryInfra\TelemetryForwarderProvider.cs (1)
28public void InitializeComponent(IBuildComponentHost host)
Microsoft.Build.Engine.UnitTests (32)
BackEnd\BuildManager_Tests.cs (4)
1920IBuildComponentHost host = _buildManager; 1946IBuildComponentHost host = _buildManager; 1978IBuildComponentHost host = _buildManager; 2030IBuildComponentHost host = _buildManager;
BackEnd\BuildRequestEngine_Tests.cs (2)
55private IBuildComponentHost _host; 225public void InitializeComponent(IBuildComponentHost host)
BackEnd\LoggingService_Tests.cs (2)
96IBuildComponentHost loggingHost = new MockHost(parameters); 953IBuildComponentHost host = new MockHost();
BackEnd\LoggingServicesLogMethod_Tests.cs (2)
1804private ProcessBuildEventHelper(LoggerMode loggerMode, int nodeId, IBuildComponentHost componentHost) 1846public static IBuildComponent CreateLoggingService(LoggerMode mode, int nodeId, IBuildComponentHost componentHost)
BackEnd\MockHost.cs (1)
178LegacyThreadingData 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)
52LegacyThreadingData IBuildComponentHost.LegacyThreadingData
BackEnd\RequestBuilder_Tests.cs (2)
342private IBuildComponentHost _host; 406public void InitializeComponent(IBuildComponentHost host)
BackEnd\Scheduler_Tests.cs (4)
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;
BackEnd\SdkResultOutOfProc_Tests.cs (1)
273((IBuildComponentHost)_buildManager).RegisterFactory(BuildComponentType.SdkResolverService, type =>
BackEnd\TargetBuilder_Tests.cs (1)
1809LegacyThreadingData IBuildComponentHost.LegacyThreadingData
BackEnd\TargetEntry_Tests.cs (3)
834NodeProviderInProc nodeProviderInProc = ((IBuildComponentHost)BuildManager.DefaultBuildManager).GetComponent(BuildComponentType.InProcNodeProvider) as NodeProviderInProc; 893NodeProviderInProc inProcNodeProvider = ((IBuildComponentHost)manager).GetComponent(BuildComponentType.InProcNodeProvider) as NodeProviderInProc; 1280LegacyThreadingData IBuildComponentHost.LegacyThreadingData
BackEnd\TaskBuilder_Tests.cs (1)
1359LegacyThreadingData IBuildComponentHost.LegacyThreadingData
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;