27 instantiations of SdkResult
Microsoft.Build (8)
BackEnd\Components\SdkResolution\MainNodeSdkResolverService.cs (1)
94nodeManager.SendData(request.NodeId, response ?? new SdkResult(sdkReference, null, null));
BackEnd\Components\SdkResolution\SdkResolverService.cs (2)
258return new SdkResult(sdk, null, null); 386sdkResult = new SdkResult(sdk, null, null);
BackEnd\Components\SdkResolution\SdkResult.cs (1)
101return new SdkResult(translator);
BackEnd\Components\SdkResolution\SdkResultFactory.cs (4)
28return new SdkResult(_sdkReference, errors, warnings); 33return new SdkResult(_sdkReference, path, version, warnings); 42return new SdkResult(_sdkReference, path, version, warnings, propertiesToAdd, itemsToAdd); 51return new SdkResult(_sdkReference, paths, version, propertiesToAdd, itemsToAdd, warnings);
Microsoft.Build.Engine.UnitTests (19)
BackEnd\SdkResolverService_Tests.cs (7)
92new SdkResultImpl( 298new SdkResultImpl( 383new SdkResultImpl( 419new SdkResultImpl( 461new SdkResultImpl( 506new SdkResultImpl( 549new SdkResultImpl(
BackEnd\SdkResultOutOfProc_Tests.cs (1)
250new Build.BackEnd.SdkResolution.SdkResult(
Definition\ProjectEvaluationContext_Tests.cs (2)
37{"foo", new SdkResult(new SdkReference("foo", "1.0.0", null), "path", "1.0.0", null) }, 38{"bar", new SdkResult(new SdkReference("bar", "1.0.0", null), "path", "1.0.0", null) }
Evaluation\Preprocessor_Tests.cs (1)
958new Build.BackEnd.SdkResolution.SdkResult(
Evaluation\SdkResultEvaluation_Tests.cs (6)
116new Build.BackEnd.SdkResolution.SdkResult( 156new Build.BackEnd.SdkResolution.SdkResult( 163new Build.BackEnd.SdkResolution.SdkResult( 250new Build.BackEnd.SdkResolution.SdkResult( 352new Build.BackEnd.SdkResolution.SdkResult( 434new Build.BackEnd.SdkResolution.SdkResult(
InternalEngineHelpers.cs (2)
83return new SdkResult(sdkResult.SdkReference, sdkResult.Warnings, sdkResult.Errors); 122return new SdkResult(sdkResult.SdkReference,
75 references to SdkResult
Microsoft.Build (49)
BackEnd\Components\SdkResolution\CachingSdkResolverService.cs (9)
20/// Stores the cache in a set of concurrent dictionaries. The main dictionary is by build submission ID and the inner dictionary contains a case-insensitive SDK name and the cached <see cref="SdkResult"/>. 22private readonly ConcurrentDictionary<int, ConcurrentDictionary<string, Lazy<SdkResult>>> _cache = new ConcurrentDictionary<int, ConcurrentDictionary<string, Lazy<SdkResult>>>(); 38public override SdkResult ResolveSdk(int submissionId, SdkReference sdk, LoggingContext loggingContext, ElementLocation sdkReferenceLocation, string solutionPath, string projectPath, bool interactive, bool isRunningInVisualStudio, bool failOnUnresolvedSdk) 40SdkResult result; 53ConcurrentDictionary<string, Lazy<SdkResult>> cached = _cache.GetOrAdd( 55_ => new ConcurrentDictionary<string, Lazy<SdkResult>>(MSBuildNameIgnoreCaseComparer.Default)); 61Lazy<SdkResult> resultLazy = cached.GetOrAdd( 63key => new Lazy<SdkResult>(() =>
BackEnd\Components\SdkResolution\HostedSdkResolverServiceBase.cs (1)
52public abstract SdkResult ResolveSdk(int submissionId, SdkReference sdk, LoggingContext loggingContext, ElementLocation sdkReferenceLocation, string solutionPath, string projectPath, bool interactive, bool isRunningInVisualStudio, bool failOnUnresolvedSdk);
BackEnd\Components\SdkResolution\ISdkResolverService.cs (2)
46/// <returns>An <see cref="SdkResult"/> containing information about the resolved SDK. If no resolver was able to resolve it, then <see cref="Framework.SdkResult.Success"/> == false. </returns> 47SdkResult ResolveSdk(int submissionId, SdkReference sdk, LoggingContext loggingContext, ElementLocation sdkReferenceLocation, string solutionPath, string projectPath, bool interactive, bool isRunningInVisualStudio, bool failOnUnresolvedSdk);
BackEnd\Components\SdkResolution\MainNodeSdkResolverService.cs (2)
69SdkResult response = null; 99public override SdkResult ResolveSdk(int submissionId, SdkReference sdk, LoggingContext loggingContext, ElementLocation sdkReferenceLocation, string solutionPath, string projectPath, bool interactive, bool isRunningInVisualStudio, bool failOnUnresolvedSdk)
BackEnd\Components\SdkResolution\OutOfProcNodeSdkResolverService.cs (10)
32private readonly ConcurrentDictionary<string, Lazy<SdkResult>> _responseCache = new ConcurrentDictionary<string, Lazy<SdkResult>>(MSBuildNameIgnoreCaseComparer.Default); 42private volatile SdkResult _lastResponse; 61HandleResponse(packet as SdkResult); 67public override SdkResult ResolveSdk(int submissionId, SdkReference sdk, LoggingContext loggingContext, ElementLocation sdkReferenceLocation, string solutionPath, string projectPath, bool interactive, bool isRunningInVisualStudio, bool failOnUnresolvedSdk) 74Lazy<SdkResult> sdkResultLazy = _responseCache.GetOrAdd( 76key => new Lazy<SdkResult>(() => 83SdkResult sdkResult = sdkResultLazy.Value; 109private void HandleResponse(SdkResult response) 118private SdkResult RequestSdkPathFromMainNode(int submissionId, SdkReference sdk, LoggingContext loggingContext, ElementLocation sdkReferenceLocation, string solutionPath, string projectPath, bool interactive, bool isRunningInVisualStudio)
BackEnd\Components\SdkResolution\SdkResolverService.cs (9)
111public virtual SdkResult ResolveSdk(int submissionId, SdkReference sdk, LoggingContext loggingContext, ElementLocation sdkReferenceLocation, string solutionPath, string projectPath, bool interactive, bool isRunningInVisualStudio, bool failOnUnresolvedSdk) 170private SdkResult ResolveSdkUsingResolversWithPatternsFirst(int submissionId, SdkReference sdk, LoggingContext loggingContext, ElementLocation sdkReferenceLocation, string solutionPath, string projectPath, bool interactive, bool isRunningInVisualStudio, bool failOnUnresolvedSdk) 195SdkResult sdkResult; 297out SdkResult sdkResult, 301List<SdkResult> results = new List<SdkResult>(); 317SdkResult result = null; 322result = (SdkResult)sdkResolver.Resolve(sdk, context, resultFactory); 352result ??= (SdkResult)resultFactory.IndicateFailure([ResourceUtilities.FormatResourceStringStripCodeAndKeyword("SDKResolverReturnedNull", sdkResolver.Name)], []);
BackEnd\Components\SdkResolution\SdkResult.cs (1)
106if (obj is SdkResult result &&
BackEnd\Node\OutOfProcNode.cs (2)
21using SdkResult = Microsoft.Build.BackEnd.SdkResolution.SdkResult; 184(this as INodePacketFactory).RegisterPacketHandler(NodePacketType.ResolveSdkResponse, SdkResult.FactoryForDeserialization, _sdkResolverService as INodePacketHandler);
Definition\Project.cs (2)
34using SdkResult = Microsoft.Build.BackEnd.SdkResolution.SdkResult; 4491public void RecordImport(ProjectImportElement importElement, ProjectRootElement import, int versionEvaluated, SdkResult sdkResult)
Evaluation\Evaluator.cs (5)
37using SdkResult = Microsoft.Build.BackEnd.SdkResolution.SdkResult; 1389List<ProjectRootElement> importedProjectRootElements = ExpandAndLoadImports(directoryOfImportingFile, importElement, out var sdkResult); 1496private List<ProjectRootElement> ExpandAndLoadImports(string directoryOfImportingFile, ProjectImportElement importElement, out SdkResult sdkResult) 1680out SdkResult sdkResult) 1873private ProjectRootElement CreateProjectForSdkResult(SdkResult sdkResult)
Evaluation\IEvaluatorData.cs (1)
291void RecordImport(ProjectImportElement importElement, ProjectRootElement import, int versionEvaluated, SdkResult sdkResult);
Evaluation\LazyItemEvaluator.EvaluatorData.cs (1)
299public void RecordImport(ProjectImportElement importElement, ProjectRootElement import, int versionEvaluated, SdkResult sdkResult)
Evaluation\PropertyTrackingEvaluatorDataWrapper.cs (2)
16using SdkResult = Microsoft.Build.BackEnd.SdkResolution.SdkResult; 162public void RecordImport(ProjectImportElement importElement, ProjectRootElement import, int versionEvaluated, SdkResult sdkResult) => _wrapped.RecordImport(importElement, import, versionEvaluated, sdkResult);
Instance\ProjectInstance.cs (2)
33using SdkResult = Microsoft.Build.BackEnd.SdkResolution.SdkResult; 1843SdkResult sdkResult)
Microsoft.Build.Engine.UnitTests (26)
BackEnd\MockSdkResolverService.cs (1)
27public Build.BackEnd.SdkResolution.SdkResult ResolveSdk(int submissionId, SdkReference sdk, LoggingContext loggingContext, ElementLocation sdkReferenceLocation, string solutionPath, string projectPath, bool interactive, bool isRunningInVisualStudio, bool failOnUnresolvedSdk)
BackEnd\SdkResolverService_Tests.cs (14)
22using SdkResultImpl = Microsoft.Build.BackEnd.SdkResolution.SdkResult; 57var result = SdkResolverService.Instance.ResolveSdk(BuildEventContext.InvalidSubmissionId, sdk, _loggingContext, new MockElementLocation("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true); 99var result = SdkResolverService.Instance.ResolveSdk(BuildEventContext.InvalidSubmissionId, sdk, _loggingContext, new MockElementLocation("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true); 129var result = SdkResolverService.Instance.ResolveSdk(BuildEventContext.InvalidSubmissionId, sdk, _loggingContext, new MockElementLocation("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true); 146var result = SdkResolverService.Instance.ResolveSdk(BuildEventContext.InvalidSubmissionId, sdk, _loggingContext, new MockElementLocation("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true); 162var result = SdkResolverService.Instance.ResolveSdk(BuildEventContext.InvalidSubmissionId, sdk, _loggingContext, new MockElementLocation("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true); 175var result = SdkResolverService.Instance.ResolveSdk(BuildEventContext.InvalidSubmissionId, sdk, _loggingContext, new MockElementLocation("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true); 207var result = SdkResolverService.Instance.ResolveSdk(BuildEventContext.InvalidSubmissionId, sdk, _loggingContext, new MockElementLocation("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true); 312var result = service.ResolveSdk(BuildEventContext.InvalidSubmissionId, sdk, _loggingContext, new MockElementLocation("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true); 393var result = SdkResolverService.Instance.ResolveSdk(BuildEventContext.InvalidSubmissionId, sdk, _loggingContext, new MockElementLocation("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true); 429var result = SdkResolverService.Instance.ResolveSdk(BuildEventContext.InvalidSubmissionId, sdk, _loggingContext, new MockElementLocation("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true); 475var result = SdkResolverService.Instance.ResolveSdk(BuildEventContext.InvalidSubmissionId, sdk, _loggingContext, new MockElementLocation("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true); 520var result = SdkResolverService.Instance.ResolveSdk(BuildEventContext.InvalidSubmissionId, sdk, _loggingContext, new MockElementLocation("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true); 627var result = service.ResolveSdk(
Definition\ProjectEvaluationContext_Tests.cs (2)
19using SdkResult = Microsoft.Build.BackEnd.SdkResolution.SdkResult; 35new Dictionary<string, SdkResult>
Evaluation\SdkResultEvaluation_Tests.cs (1)
155var sdkResult = useSinglePathResult ?
InternalEngineHelpers.cs (8)
18using SdkResult = Microsoft.Build.BackEnd.SdkResolution.SdkResult; 41private readonly Dictionary<string, SdkResult> _resultMap; 46public ConfigurableMockSdkResolver(SdkResult result) 48_resultMap = new Dictionary<string, SdkResult> { [result.SdkReference.Name] = result }; 51public ConfigurableMockSdkResolver(Dictionary<string, SdkResult> resultMap) 74return _resultMap.TryGetValue(sdkReference.Name, out var result) 79private SdkResult CloneSdkResult(SdkResult sdkResult)