27 instantiations of SdkResult
Microsoft.Build (8)
BackEnd\Components\SdkResolution\MainNodeSdkResolverService.cs (1)
94
nodeManager.SendData(request.NodeId, response ?? new
SdkResult
(sdkReference, null, null));
BackEnd\Components\SdkResolution\SdkResolverService.cs (2)
259
return new
SdkResult
(sdk, null, null);
387
sdkResult = new
SdkResult
(sdk, null, null);
BackEnd\Components\SdkResolution\SdkResult.cs (1)
101
return new
SdkResult
(translator);
BackEnd\Components\SdkResolution\SdkResultFactory.cs (4)
28
return new
SdkResult
(_sdkReference, errors, warnings);
33
return new
SdkResult
(_sdkReference, path, version, warnings);
42
return new
SdkResult
(_sdkReference, path, version, warnings, propertiesToAdd, itemsToAdd);
51
return new
SdkResult
(_sdkReference, paths, version, propertiesToAdd, itemsToAdd, warnings);
Microsoft.Build.Engine.UnitTests (19)
BackEnd\SdkResolverService_Tests.cs (7)
91
new
SdkResultImpl
(
353
new
SdkResultImpl
(
438
new
SdkResultImpl
(
475
new
SdkResultImpl
(
518
new
SdkResultImpl
(
564
new
SdkResultImpl
(
608
new
SdkResultImpl
(
BackEnd\SdkResultOutOfProc_Tests.cs (1)
250
new 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)
958
new Build.BackEnd.SdkResolution.
SdkResult
(
Evaluation\SdkResultEvaluation_Tests.cs (6)
116
new Build.BackEnd.SdkResolution.
SdkResult
(
156
new Build.BackEnd.SdkResolution.
SdkResult
(
163
new Build.BackEnd.SdkResolution.
SdkResult
(
250
new Build.BackEnd.SdkResolution.
SdkResult
(
352
new Build.BackEnd.SdkResolution.
SdkResult
(
434
new Build.BackEnd.SdkResolution.
SdkResult
(
InternalEngineHelpers.cs (2)
83
return new
SdkResult
(sdkResult.SdkReference, sdkResult.Warnings, sdkResult.Errors);
122
return new
SdkResult
(sdkResult.SdkReference,
76 references to SdkResult
Microsoft.Build (50)
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
"/>.
22
private readonly ConcurrentDictionary<int, ConcurrentDictionary<string, Lazy<
SdkResult
>>> _cache = new ConcurrentDictionary<int, ConcurrentDictionary<string, Lazy<
SdkResult
>>>();
38
public override
SdkResult
ResolveSdk(int submissionId, SdkReference sdk, LoggingContext loggingContext, ElementLocation sdkReferenceLocation, string solutionPath, string projectPath, bool interactive, bool isRunningInVisualStudio, bool failOnUnresolvedSdk)
40
SdkResult
result;
53
ConcurrentDictionary<string, Lazy<
SdkResult
>> cached = _cache.GetOrAdd(
55
_ => new ConcurrentDictionary<string, Lazy<
SdkResult
>>(MSBuildNameIgnoreCaseComparer.Default));
61
Lazy<
SdkResult
> resultLazy = cached.GetOrAdd(
63
key => new Lazy<
SdkResult
>(() =>
BackEnd\Components\SdkResolution\HostedSdkResolverServiceBase.cs (1)
52
public 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>
47
SdkResult
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)
69
SdkResult
response = null;
99
public 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)
32
private readonly ConcurrentDictionary<string, Lazy<
SdkResult
>> _responseCache = new ConcurrentDictionary<string, Lazy<
SdkResult
>>(MSBuildNameIgnoreCaseComparer.Default);
42
private volatile
SdkResult
_lastResponse;
61
HandleResponse(packet as
SdkResult
);
67
public override
SdkResult
ResolveSdk(int submissionId, SdkReference sdk, LoggingContext loggingContext, ElementLocation sdkReferenceLocation, string solutionPath, string projectPath, bool interactive, bool isRunningInVisualStudio, bool failOnUnresolvedSdk)
74
Lazy<
SdkResult
> sdkResultLazy = _responseCache.GetOrAdd(
76
key => new Lazy<
SdkResult
>(() =>
83
SdkResult
sdkResult = sdkResultLazy.Value;
109
private void HandleResponse(
SdkResult
response)
118
private
SdkResult
RequestSdkPathFromMainNode(int submissionId, SdkReference sdk, LoggingContext loggingContext, ElementLocation sdkReferenceLocation, string solutionPath, string projectPath, bool interactive, bool isRunningInVisualStudio)
BackEnd\Components\SdkResolution\SdkResolverService.cs (10)
111
public virtual
SdkResult
ResolveSdk(int submissionId, SdkReference sdk, LoggingContext loggingContext, ElementLocation sdkReferenceLocation, string solutionPath, string projectPath, bool interactive, bool isRunningInVisualStudio, bool failOnUnresolvedSdk)
152
out
SdkResult
sdkResult,
170
private
SdkResult
ResolveSdkUsingResolversWithPatternsFirst(int submissionId, SdkReference sdk, LoggingContext loggingContext, ElementLocation sdkReferenceLocation, string solutionPath, string projectPath, bool interactive, bool isRunningInVisualStudio, bool failOnUnresolvedSdk)
196
SdkResult
sdkResult;
298
out
SdkResult
sdkResult,
302
List<
SdkResult
> results = new List<
SdkResult
>();
318
SdkResult
result = null;
323
result = (
SdkResult
)sdkResolver.Resolve(sdk, context, resultFactory);
353
result ??= (
SdkResult
)resultFactory.IndicateFailure([ResourceUtilities.FormatResourceStringStripCodeAndKeyword("SDKResolverReturnedNull", sdkResolver.Name)], []);
BackEnd\Components\SdkResolution\SdkResult.cs (1)
106
if (obj is
SdkResult
result &&
BackEnd\Node\OutOfProcNode.cs (2)
21
using SdkResult = Microsoft.Build.BackEnd.SdkResolution.
SdkResult
;
184
(this as INodePacketFactory).RegisterPacketHandler(NodePacketType.ResolveSdkResponse,
SdkResult
.FactoryForDeserialization, _sdkResolverService as INodePacketHandler);
Definition\Project.cs (2)
34
using SdkResult = Microsoft.Build.BackEnd.SdkResolution.
SdkResult
;
4491
public void RecordImport(ProjectImportElement importElement, ProjectRootElement import, int versionEvaluated,
SdkResult
sdkResult)
Evaluation\Evaluator.cs (5)
37
using SdkResult = Microsoft.Build.BackEnd.SdkResolution.
SdkResult
;
1389
List<ProjectRootElement> importedProjectRootElements = ExpandAndLoadImports(directoryOfImportingFile, importElement, out
var
sdkResult);
1496
private List<ProjectRootElement> ExpandAndLoadImports(string directoryOfImportingFile, ProjectImportElement importElement, out
SdkResult
sdkResult)
1680
out
SdkResult
sdkResult)
1873
private ProjectRootElement CreateProjectForSdkResult(
SdkResult
sdkResult)
Evaluation\IEvaluatorData.cs (1)
291
void RecordImport(ProjectImportElement importElement, ProjectRootElement import, int versionEvaluated,
SdkResult
sdkResult);
Evaluation\LazyItemEvaluator.EvaluatorData.cs (1)
299
public void RecordImport(ProjectImportElement importElement, ProjectRootElement import, int versionEvaluated,
SdkResult
sdkResult)
Evaluation\PropertyTrackingEvaluatorDataWrapper.cs (2)
16
using SdkResult = Microsoft.Build.BackEnd.SdkResolution.
SdkResult
;
162
public void RecordImport(ProjectImportElement importElement, ProjectRootElement import, int versionEvaluated,
SdkResult
sdkResult) => _wrapped.RecordImport(importElement, import, versionEvaluated, sdkResult);
Instance\ProjectInstance.cs (2)
33
using SdkResult = Microsoft.Build.BackEnd.SdkResolution.
SdkResult
;
1843
SdkResult
sdkResult)
Microsoft.Build.Engine.UnitTests (26)
BackEnd\MockSdkResolverService.cs (1)
27
public 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)
24
using SdkResultImpl = Microsoft.Build.BackEnd.SdkResolution.
SdkResult
;
55
var
result = service.ResolveSdk(BuildEventContext.InvalidSubmissionId, sdk, _loggingContext, new MockElementLocation("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true);
98
var
result = service.ResolveSdk(BuildEventContext.InvalidSubmissionId, sdk, _loggingContext, new MockElementLocation("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true);
130
var
result = service.ResolveSdk(BuildEventContext.InvalidSubmissionId, sdk, _loggingContext, new MockElementLocation("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true);
194
var
result = service.ResolveSdk(BuildEventContext.InvalidSubmissionId, sdk, _loggingContext, new MockElementLocation("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true);
211
var
result = service.ResolveSdk(BuildEventContext.InvalidSubmissionId, sdk, _loggingContext, new MockElementLocation("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true);
225
var
result = service.ResolveSdk(BuildEventContext.InvalidSubmissionId, sdk, _loggingContext, new MockElementLocation("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true);
259
var
result = service.ResolveSdk(BuildEventContext.InvalidSubmissionId, sdk, _loggingContext, new MockElementLocation("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true);
367
var
result = service.ResolveSdk(BuildEventContext.InvalidSubmissionId, sdk, _loggingContext, new MockElementLocation("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true);
449
var
result = service.ResolveSdk(BuildEventContext.InvalidSubmissionId, sdk, _loggingContext, new MockElementLocation("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true);
486
var
result = service.ResolveSdk(BuildEventContext.InvalidSubmissionId, sdk, _loggingContext, new MockElementLocation("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true);
533
var
result = service.ResolveSdk(BuildEventContext.InvalidSubmissionId, sdk, _loggingContext, new MockElementLocation("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true);
579
var
result = service.ResolveSdk(BuildEventContext.InvalidSubmissionId, sdk, _loggingContext, new MockElementLocation("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true);
686
var
result = service.ResolveSdk(
Definition\ProjectEvaluationContext_Tests.cs (2)
19
using SdkResult = Microsoft.Build.BackEnd.SdkResolution.
SdkResult
;
35
new Dictionary<string,
SdkResult
>
Evaluation\SdkResultEvaluation_Tests.cs (1)
155
var
sdkResult = useSinglePathResult ?
InternalEngineHelpers.cs (8)
18
using SdkResult = Microsoft.Build.BackEnd.SdkResolution.
SdkResult
;
41
private readonly Dictionary<string,
SdkResult
> _resultMap;
46
public ConfigurableMockSdkResolver(
SdkResult
result)
48
_resultMap = new Dictionary<string,
SdkResult
> { [result.SdkReference.Name] = result };
51
public ConfigurableMockSdkResolver(Dictionary<string,
SdkResult
> resultMap)
74
return _resultMap.TryGetValue(sdkReference.Name, out
var
result)
79
private
SdkResult
CloneSdkResult(
SdkResult
sdkResult)