21 instantiations of SDKReference
Microsoft.Build.Tasks.Core (1)
ResolveSDKReference.cs (1)
568
var reference = new
SDKReference
(referenceItem, sdkSimpleName, rawSdkVersion);
Microsoft.Build.Tasks.UnitTests (20)
ResolveSDKReference_Tests.cs (20)
99
HashSet<SDKReference> resolvedSDKs = new HashSet<SDKReference>() { new
SDKReference
(new TaskItem(), "bar", "1.0"), new
SDKReference
(new TaskItem(), "foo", "1.0"), new
SDKReference
(new TaskItem(), "Newt", "1.0") };
320
SDKReference reference1 = new
SDKReference
(new TaskItem(), "Microsoft.VCLibs", "12.0");
324
SDKReference reference2 = new
SDKReference
(new TaskItem(), "Microsoft.VCLibs", "11.0");
328
SDKReference reference3 = new
SDKReference
(new TaskItem(), "Foo", "11.0");
363
SDKReference reference1 = new
SDKReference
(new TaskItem(), "reference1", "1.0");
366
SDKReference reference2 = new
SDKReference
(new TaskItem(), "reference2", "1.0");
370
SDKReference reference3 = new
SDKReference
(new TaskItem(), "reference3", "1.0");
374
SDKReference reference4 = new
SDKReference
(new TaskItem(), "reference4", "1.0");
378
SDKReference reference5 = new
SDKReference
(new TaskItem(), "reference5", "1.0");
393
reference1 = new
SDKReference
(new TaskItem(), "reference1", "1.0");
397
reference2 = new
SDKReference
(new TaskItem(), "reference2", "1.0");
401
reference3 = new
SDKReference
(new TaskItem(), "reference3", "1.0");
405
reference4 = new
SDKReference
(new TaskItem(), "reference4", "1.0");
532
SDKReference sdkReference1 = new
SDKReference
(dummyItem, "Reference1", "8.0");
533
SDKReference shouldBeEqualToOne = new
SDKReference
(dummyItem, "Reference1", "8.0");
534
SDKReference sdkReference2 = new
SDKReference
(dummyItem, "Reference2", "8.0");
535
SDKReference sdkReference2DiffVer = new
SDKReference
(dummyItem, "Reference2", "7.0");
4199
SDKReference reference =
new
(new TaskItem("sdkReference", new Dictionary<string, string>() { { SDKManifest.Attributes.TargetPlatform, "UAP" } }), "sdkName", "1.0.2");
54 references to SDKReference
Microsoft.Build.Tasks.Core (28)
ResolveSDKReference.cs (28)
325
var sdkReferenceItems = new HashSet<
SDKReference
>();
328
var productFamilyNameToSDK = new Dictionary<string, HashSet<
SDKReference
>>(StringComparer.OrdinalIgnoreCase);
331
var sdkNameToSDK = new Dictionary<string, HashSet<
SDKReference
>>(StringComparer.OrdinalIgnoreCase);
334
var sdksNotCompatibleWithOtherSDKs = new HashSet<
SDKReference
>();
341
SDKReference
reference = ParseSDKReference(referenceItem);
359
if (!productFamilyNameToSDK.TryGetValue(reference.ProductFamilyName, out HashSet<
SDKReference
> sdksWithProductFamilyName))
361
productFamilyNameToSDK.Add(reference.ProductFamilyName, new HashSet<
SDKReference
> { reference });
374
if (!sdkNameToSDK.TryGetValue(reference.SimpleName, out HashSet<
SDKReference
> sdksWithSimpleName))
376
sdkNameToSDK.Add(reference.SimpleName, new HashSet<
SDKReference
> { reference });
387
foreach (
SDKReference
reference in sdkReferenceItems)
394
foreach (
SDKReference
notCompatibleReference in sdksNotCompatibleWithOtherSDKs)
399
var sdksAlreadyErrorOrWarnedFor = new HashSet<
SDKReference
>();
404
if (productFamilyNameToSDK.TryGetValue(notCompatibleReference.ProductFamilyName, out HashSet<
SDKReference
> referenceInProductFamily))
408
foreach (
SDKReference
incompatibleReference in referenceInProductFamily)
433
if (sdkNameToSDK.TryGetValue(notCompatibleReference.SimpleName, out HashSet<
SDKReference
> referenceWithSameName))
437
foreach (
SDKReference
incompatibleReference in referenceWithSameName)
475
internal static void AddMetadataToReferences(TaskLoggingHelper log, HashSet<
SDKReference
> sdkReferenceItems, Dictionary<string, string> referencesToAddMetadata, string metadataName, string metadataValue)
479
foreach (
SDKReference
referenceItem in sdkReferenceItems)
495
internal static void VerifySDKDependsOn(TaskLoggingHelper log, HashSet<
SDKReference
> sdkReferenceItems)
497
foreach (
SDKReference
reference in sdkReferenceItems)
519
internal static string[] GetUnresolvedDependentSDKs(HashSet<
SDKReference
> sdkReferenceItems, List<string> dependentSDKs)
531
var
resolvedReference = sdkReferenceItems.Where(y => String.Equals(y.SimpleName, simpleName, StringComparison.OrdinalIgnoreCase) && String.Equals(y.Version, sdkVersion, StringComparison.OrdinalIgnoreCase)).DefaultIfEmpty(null).FirstOrDefault();
558
internal
SDKReference
ParseSDKReference(ITaskItem referenceItem)
568
var
reference = new SDKReference(referenceItem, sdkSimpleName, rawSdkVersion);
597
private void LogResolution(
SDKReference
reference)
656
internal class SDKReference : IEquatable<
SDKReference
>
940
if (!(obj is
SDKReference
reference))
959
public bool Equals(
SDKReference
other)
Microsoft.Build.Tasks.UnitTests (26)
ResolveSDKReference_Tests.cs (26)
16
using SDKReference = Microsoft.Build.Tasks.ResolveSDKReference.
SDKReference
;
96
HashSet<
SDKReference
> resolvedSDKsEmpty = new HashSet<
SDKReference
>();
99
HashSet<
SDKReference
> resolvedSDKs = new HashSet<
SDKReference
>() { new SDKReference(new TaskItem(), "bar", "1.0"), new SDKReference(new TaskItem(), "foo", "1.0"), new SDKReference(new TaskItem(), "Newt", "1.0") };
105
result = ResolveSDKReference.GetUnresolvedDependentSDKs(new HashSet<
SDKReference
>(), dependentSDKs);
319
HashSet<
SDKReference
> references = new HashSet<
SDKReference
>();
320
SDKReference
reference1 = new SDKReference(new TaskItem(), "Microsoft.VCLibs", "12.0");
324
SDKReference
reference2 = new SDKReference(new TaskItem(), "Microsoft.VCLibs", "11.0");
328
SDKReference
reference3 = new SDKReference(new TaskItem(), "Foo", "11.0");
338
foreach (
SDKReference
reference in references)
360
HashSet<
SDKReference
> references = new HashSet<
SDKReference
>();
363
SDKReference
reference1 = new SDKReference(new TaskItem(), "reference1", "1.0");
366
SDKReference
reference2 = new SDKReference(new TaskItem(), "reference2", "1.0");
370
SDKReference
reference3 = new SDKReference(new TaskItem(), "reference3", "1.0");
374
SDKReference
reference4 = new SDKReference(new TaskItem(), "reference4", "1.0");
378
SDKReference
reference5 = new SDKReference(new TaskItem(), "reference5", "1.0");
391
references = new HashSet<
SDKReference
>();
532
SDKReference
sdkReference1 = new SDKReference(dummyItem, "Reference1", "8.0");
533
SDKReference
shouldBeEqualToOne = new SDKReference(dummyItem, "Reference1", "8.0");
534
SDKReference
sdkReference2 = new SDKReference(dummyItem, "Reference2", "8.0");
535
SDKReference
sdkReference2DiffVer = new SDKReference(dummyItem, "Reference2", "7.0");
552
SDKReference
reference = t.ParseSDKReference(referenceInclude);
4199
SDKReference
reference = new(new TaskItem("sdkReference", new Dictionary<string, string>() { { SDKManifest.Attributes.TargetPlatform, "UAP" } }), "sdkName", "1.0.2");