25 instantiations of TargetPlatformSDK
Microsoft.Build.Utilities.Core (6)
ToolLocationHelper.cs (6)
2482extensionSdk = new TargetPlatformSDK(string.Empty, new Version(0, 0), null);
2615platformSDKKey = new TargetPlatformSDK(uapRegistryName, directoryUnderRoot.Key, null);
2619platformSDKKey = new TargetPlatformSDK(rootPathWithIdentifier.Name, directoryUnderRoot.Key, null);
2634targetPlatformSDK = new TargetPlatformSDK(platformSDKKey.TargetPlatformIdentifier, platformSDKKey.TargetPlatformVersion, platformSDKManifestExists ? platformSDKDirectory : null);
2718TargetPlatformSDK platformSDKKey = new TargetPlatformSDK(platformIdentifier, registryVersions.Key, null);
2754targetPlatformSDK = new TargetPlatformSDK(platformSDKKey.TargetPlatformIdentifier, platformSDKKey.TargetPlatformVersion, platformSDKmanifestExists ? platformSDKDirectory : null);
Microsoft.Build.Utilities.UnitTests (19)
ToolLocationHelper_Tests.cs (19)
238TargetPlatformSDK sdk = new TargetPlatformSDK("Foo", new Version(0, 0), string.Empty);
263TargetPlatformSDK sdk = new TargetPlatformSDK("Foo", new Version(0, 0), string.Empty);
289TargetPlatformSDK sdk = new TargetPlatformSDK("Foo", new Version(0, 0), string.Empty);
315TargetPlatformSDK sdk = new TargetPlatformSDK("Foo", new Version(0, 0), string.Empty);
3792TargetPlatformSDK key = new TargetPlatformSDK("Windows", new Version("1.0"), null);
3800key = new TargetPlatformSDK("Windows", new Version("2.0"), null);
3809key = new TargetPlatformSDK("MyPlatform", new Version("6.0"), null);
3812key = new TargetPlatformSDK("MyPlatform", new Version("4.0"), null);
3818key = new TargetPlatformSDK("MyPlatform", new Version("3.0"), null);
3824key = new TargetPlatformSDK("MyPlatform", new Version("2.0"), null);
3830key = new TargetPlatformSDK("MyPlatform", new Version("1.0"), null);
3834key = new TargetPlatformSDK("MyPlatform", new Version("8.0"), null);
3843key = new TargetPlatformSDK("MyPlatform", new Version("9.0"), null);
4063TargetPlatformSDK key = new TargetPlatformSDK("Windows", new Version("1.0"), null);
4066key = new TargetPlatformSDK("Windows", new Version("2.0"), null);
4069key = new TargetPlatformSDK("MyPlatform", new Version("3.0"), null);
4072key = new TargetPlatformSDK("MyPlatform", new Version("2.0"), null);
4075key = new TargetPlatformSDK("MyPlatform", new Version("1.0"), null);
4078key = new TargetPlatformSDK("MyPlatform", new Version("5.0"), null);
94 references to TargetPlatformSDK
Microsoft.Build.Utilities.Core (68)
ToolLocationHelper.cs (65)
237private static Dictionary<string, IEnumerable<TargetPlatformSDK>> s_cachedTargetPlatforms;
242private static Dictionary<string, TargetPlatformSDK> s_cachedExtensionSdks;
404IEnumerable<TargetPlatformSDK> targetPlatformMonikers = GetTargetPlatformMonikers(diskRoots, extensionDiskRoots, registryRoot, targetPlatformIdentifier, targetPlatformVersion);
405foreach (TargetPlatformSDK moniker in targetPlatformMonikers)
450IEnumerable<TargetPlatformSDK> targetPlatformMonikers = GetTargetPlatformMonikers(diskRoots, multiPlatformDiskRoots, registryRoot, targetPlatformIdentifier, targetPlatformVersion);
452foreach (TargetPlatformSDK moniker in targetPlatformMonikers)
465private static IEnumerable<TargetPlatformSDK> GetTargetPlatformMonikers(string[] diskRoots, string[] extensionDiskRoots, string registryRoot, string targetPlatformIdentifier, Version targetPlatformVersion)
473IEnumerable<TargetPlatformSDK> targetPlatformSDKs = RetrieveTargetPlatformList(diskRoots, extensionDiskRoots, registryRoot);
476.Where<TargetPlatformSDK>(platformSDK =>
482.OrderBy<TargetPlatformSDK, Version>(platform => platform.TargetPlatformVersion);
529IEnumerable<TargetPlatformSDK> targetPlatforms = RetrieveTargetPlatformList(diskRoots, extensionDiskRoots, registryRoot);
530var targetPlatformMoniker = targetPlatforms.Where<TargetPlatformSDK>(
538.OrderByDescending<TargetPlatformSDK, Version>(platform => platform.TargetPlatformVersion)
539.DefaultIfEmpty(null).FirstOrDefault<TargetPlatformSDK>();
765public static IList<TargetPlatformSDK> GetTargetPlatformSdks() => GetTargetPlatformSdks(null, null);
773public static IList<TargetPlatformSDK> GetTargetPlatformSdks(string[] diskRoots, string registryRoot)
775IEnumerable<TargetPlatformSDK> targetPlatforms = RetrieveTargetPlatformList(diskRoots, null, registryRoot);
776return targetPlatforms.Where<TargetPlatformSDK>(platform => platform.Path != null).ToList<TargetPlatformSDK>();
786public static IList<TargetPlatformSDK> FilterTargetPlatformSdks(IList<TargetPlatformSDK> targetPlatformSdkList, Version osVersion, Version vsVersion)
788var filteredTargetPlatformSdkList = new List<TargetPlatformSDK>();
790foreach (TargetPlatformSDK targetPlatformSdk in targetPlatformSdkList)
967TargetPlatformSDK matchingSdk = GetMatchingPlatformSDK(targetSdkIdentifier, targetSdkVersion, diskRoots, extensionDiskRoots, registryRoot);
1008private static string GetPlatformVersion(TargetPlatformSDK targetSdk, string targetPlatformIdentifier, string targetPlatformVersion)
1010string platformKey = TargetPlatformSDK.GetSdkKey(targetPlatformIdentifier, targetPlatformVersion);
1090TargetPlatformSDK matchingSdk = GetMatchingPlatformSDK(targetPlatformIdentifier, targetPlatformVersion, diskRoots, null, registryRoot);
1091string platformKey = TargetPlatformSDK.GetSdkKey(targetPlatformIdentifier, targetPlatformVersion);
1153private static bool TryGetPlatformManifest(TargetPlatformSDK matchingSdk, string platformKey, out PlatformManifest manifest)
1231TargetPlatformSDK matchingSdk = GetMatchingPlatformSDK(targetPlatformIdentifier, targetPlatformVersion, diskRoot, null, null);
1232string platformKey = TargetPlatformSDK.GetSdkKey(targetPlatformIdentifier, targetPlatformVersion);
1264var targetPlatform = GetMatchingPlatformSDK(targetPlatformIdentifier, targetPlatformVersion, diskRoots, null, registryRoot);
1316TargetPlatformSDK targetPlatform = GetMatchingPlatformSDK(targetPlatformIdentifier, targetPlatformVersion, diskRoots, null, registryRoot);
1341IEnumerable<TargetPlatformSDK> targetPlatformSDKs = RetrieveTargetPlatformList(diskRoots, null, registryRoot);
1344foreach (TargetPlatformSDK sdk in targetPlatformSDKs)
1559private static TargetPlatformSDK GetMatchingPlatformSDK(string targetPlatformIdentifier, string targetPlatformVersion, string diskRoots, string multiPlatformDiskRoots, string registryRoot)
1587private static TargetPlatformSDK GetMatchingPlatformSDK(string targetPlatformIdentifier, Version targetPlatformVersion, string[] diskRoots, string[] multiPlatformDiskRoots, string registryRoot)
1592IEnumerable<TargetPlatformSDK> targetPlatforms = RetrieveTargetPlatformList(diskRoots, multiPlatformDiskRoots, registryRoot);
1594TargetPlatformSDK matchingSdk = targetPlatforms
1595.FirstOrDefault<TargetPlatformSDK>(platform =>
1605matchingSdk = targetPlatforms.FirstOrDefault<TargetPlatformSDK>(platform => platform.ContainsPlatform(targetPlatformIdentifier, versionString));
2437private static IEnumerable<TargetPlatformSDK> RetrieveTargetPlatformList(string[] diskRoots, string[] extensionDiskRoots, string registrySearchLocation)
2455s_cachedTargetPlatforms = new Dictionary<string, IEnumerable<TargetPlatformSDK>>(StringComparer.OrdinalIgnoreCase);
2460s_cachedExtensionSdks = new Dictionary<string, TargetPlatformSDK>(StringComparer.OrdinalIgnoreCase);
2463if (!s_cachedTargetPlatforms.TryGetValue(cachedTargetPlatformsKey, out IEnumerable<TargetPlatformSDK> collection))
2465var monikers = new Dictionary<TargetPlatformSDK, TargetPlatformSDK>();
2479if (!s_cachedExtensionSdks.TryGetValue(cachedExtensionSdksKey, out TargetPlatformSDK extensionSdk))
2497private static void GatherExtensionSDKListFromDirectory(IEnumerable<string> diskRoots, TargetPlatformSDK extensionSdk)
2524internal static void GatherExtensionSDKs(DirectoryInfo extensionSdksDirectory, TargetPlatformSDK targetPlatformSDK)
2546string SDKKey = TargetPlatformSDK.GetSdkKey(sdkNameFolders.Name, sdkVersionDirectory.Name);
2578internal static void GatherSDKListFromDirectory(List<string> diskroots, Dictionary<TargetPlatformSDK, TargetPlatformSDK> platformSDKs)
2612TargetPlatformSDK platformSDKKey;
2621TargetPlatformSDK targetPlatformSDK = null;
2672internal static void GatherSDKsFromRegistryImpl(Dictionary<TargetPlatformSDK, TargetPlatformSDK> platformMonikers, string registryKeyRoot, RegistryView registryView, RegistryHive registryHive, GetRegistrySubKeyNames getRegistrySubKeyNames, GetRegistrySubKeyDefaultValue getRegistrySubKeyDefaultValue, OpenBaseKey openBaseKey, FileExists fileExists)
2718TargetPlatformSDK platformSDKKey = new TargetPlatformSDK(platformIdentifier, registryVersions.Key, null);
2719TargetPlatformSDK targetPlatformSDK = null;
2814string sdkKey = TargetPlatformSDK.GetSdkKey(sdkName, sdkVersion);
2863private static void GatherSDKListFromRegistry(string registryRoot, Dictionary<TargetPlatformSDK, TargetPlatformSDK> platformMonikers)
3021private static void GatherPlatformsForSdk(TargetPlatformSDK sdk)
3048string sdkKey = TargetPlatformSDK.GetSdkKey(platformIdentifier.Name, platformVersion.Name);
Microsoft.Build.Utilities.UnitTests (26)
ToolLocationHelper_Tests.cs (26)
238TargetPlatformSDK sdk = new TargetPlatformSDK("Foo", new Version(0, 0), string.Empty);
263TargetPlatformSDK sdk = new TargetPlatformSDK("Foo", new Version(0, 0), string.Empty);
289TargetPlatformSDK sdk = new TargetPlatformSDK("Foo", new Version(0, 0), string.Empty);
315TargetPlatformSDK sdk = new TargetPlatformSDK("Foo", new Version(0, 0), string.Empty);
3080var targetPlatform = new Dictionary<TargetPlatformSDK, TargetPlatformSDK>();
3092var targetPlatform = new Dictionary<TargetPlatformSDK, TargetPlatformSDK>();
3107var targetPlatform = new Dictionary<TargetPlatformSDK, TargetPlatformSDK>();
3481IList<TargetPlatformSDK> sdkList = ToolLocationHelper.GetTargetPlatformSdks(new[] { _fakeStructureRoot }, null);
3482IList<TargetPlatformSDK> filteredSdkList = ToolLocationHelper.FilterTargetPlatformSdks(sdkList, new Version(6, 2, 5), new Version(12, 0));
3483IList<TargetPlatformSDK> filteredSdkList1 = ToolLocationHelper.FilterTargetPlatformSdks(sdkList, new Version(6, 2, 1), new Version(10, 0));
3484IList<TargetPlatformSDK> filteredSdkList2 = ToolLocationHelper.FilterTargetPlatformSdks(sdkList, new Version(6, 2, 3), new Version(10, 0));
3485IList<TargetPlatformSDK> filteredSdkList3 = ToolLocationHelper.FilterTargetPlatformSdks(sdkList, new Version(6, 2, 3), new Version(11, 0));
3488IList<TargetPlatformSDK> filteredSdkList4 = ToolLocationHelper.FilterTargetPlatformSdks(sdkList, new Version(6, 2, 3), null);
3491IList<TargetPlatformSDK> filteredSdkList5 = ToolLocationHelper.FilterTargetPlatformSdks(sdkList, null, new Version(10, 0));
3494IList<TargetPlatformSDK> filteredSdkList6 = ToolLocationHelper.FilterTargetPlatformSdks(sdkList, null, null);
3788var targetPlatforms = new Dictionary<TargetPlatformSDK, TargetPlatformSDK>();
3792TargetPlatformSDK key = new TargetPlatformSDK("Windows", new Version("1.0"), null);
4055IList<TargetPlatformSDK> sdks = ToolLocationHelper.GetTargetPlatformSdks(new[] { _fakeStructureRoot }, null);
4057var targetPlatforms = new Dictionary<TargetPlatformSDK, TargetPlatformSDK>();
4058foreach (TargetPlatformSDK sdk in sdks)
4063TargetPlatformSDK key = new TargetPlatformSDK("Windows", new Version("1.0"), null);