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)
258
return new
SdkResult
(sdk, null, null);
386
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)
92
new
SdkResultImpl
(
298
new
SdkResultImpl
(
383
new
SdkResultImpl
(
419
new
SdkResultImpl
(
461
new
SdkResultImpl
(
506
new
SdkResultImpl
(
549
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,
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
"/>.
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 (9)
111
public virtual
SdkResult
ResolveSdk(int submissionId, SdkReference sdk, LoggingContext loggingContext, ElementLocation sdkReferenceLocation, string solutionPath, string projectPath, bool interactive, bool isRunningInVisualStudio, bool failOnUnresolvedSdk)
170
private
SdkResult
ResolveSdkUsingResolversWithPatternsFirst(int submissionId, SdkReference sdk, LoggingContext loggingContext, ElementLocation sdkReferenceLocation, string solutionPath, string projectPath, bool interactive, bool isRunningInVisualStudio, bool failOnUnresolvedSdk)
195
SdkResult
sdkResult;
297
out
SdkResult
sdkResult,
301
List<
SdkResult
> results = new List<
SdkResult
>();
317
SdkResult
result = null;
322
result = (
SdkResult
)sdkResolver.Resolve(sdk, context, resultFactory);
352
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)
22
using SdkResultImpl = Microsoft.Build.BackEnd.SdkResolution.
SdkResult
;
57
var
result = SdkResolverService.Instance.ResolveSdk(BuildEventContext.InvalidSubmissionId, sdk, _loggingContext, new MockElementLocation("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true);
99
var
result = SdkResolverService.Instance.ResolveSdk(BuildEventContext.InvalidSubmissionId, sdk, _loggingContext, new MockElementLocation("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true);
129
var
result = SdkResolverService.Instance.ResolveSdk(BuildEventContext.InvalidSubmissionId, sdk, _loggingContext, new MockElementLocation("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true);
146
var
result = SdkResolverService.Instance.ResolveSdk(BuildEventContext.InvalidSubmissionId, sdk, _loggingContext, new MockElementLocation("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true);
162
var
result = SdkResolverService.Instance.ResolveSdk(BuildEventContext.InvalidSubmissionId, sdk, _loggingContext, new MockElementLocation("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true);
175
var
result = SdkResolverService.Instance.ResolveSdk(BuildEventContext.InvalidSubmissionId, sdk, _loggingContext, new MockElementLocation("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true);
207
var
result = SdkResolverService.Instance.ResolveSdk(BuildEventContext.InvalidSubmissionId, sdk, _loggingContext, new MockElementLocation("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true);
312
var
result = service.ResolveSdk(BuildEventContext.InvalidSubmissionId, sdk, _loggingContext, new MockElementLocation("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true);
393
var
result = SdkResolverService.Instance.ResolveSdk(BuildEventContext.InvalidSubmissionId, sdk, _loggingContext, new MockElementLocation("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true);
429
var
result = SdkResolverService.Instance.ResolveSdk(BuildEventContext.InvalidSubmissionId, sdk, _loggingContext, new MockElementLocation("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true);
475
var
result = SdkResolverService.Instance.ResolveSdk(BuildEventContext.InvalidSubmissionId, sdk, _loggingContext, new MockElementLocation("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true);
520
var
result = SdkResolverService.Instance.ResolveSdk(BuildEventContext.InvalidSubmissionId, sdk, _loggingContext, new MockElementLocation("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true);
627
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)