25 instantiations of TargetPlatformSDK
Microsoft.Build.Utilities.Core (6)
ToolLocationHelper.cs (6)
2483extensionSdk = new TargetPlatformSDK(string.Empty, new Version(0, 0), null); 2616platformSDKKey = new TargetPlatformSDK(uapRegistryName, directoryUnderRoot.Key, null); 2620platformSDKKey = new TargetPlatformSDK(rootPathWithIdentifier.Name, directoryUnderRoot.Key, null); 2635targetPlatformSDK = new TargetPlatformSDK(platformSDKKey.TargetPlatformIdentifier, platformSDKKey.TargetPlatformVersion, platformSDKManifestExists ? platformSDKDirectory : null); 2719TargetPlatformSDK platformSDKKey = new TargetPlatformSDK(platformIdentifier, registryVersions.Key, null); 2755targetPlatformSDK = new TargetPlatformSDK(platformSDKKey.TargetPlatformIdentifier, platformSDKKey.TargetPlatformVersion, platformSDKmanifestExists ? platformSDKDirectory : null);
Microsoft.Build.Utilities.UnitTests (19)
ToolLocationHelper_Tests.cs (19)
232TargetPlatformSDK sdk = new TargetPlatformSDK("Foo", new Version(0, 0), string.Empty); 257TargetPlatformSDK sdk = new TargetPlatformSDK("Foo", new Version(0, 0), string.Empty); 283TargetPlatformSDK sdk = new TargetPlatformSDK("Foo", new Version(0, 0), string.Empty); 309TargetPlatformSDK sdk = new TargetPlatformSDK("Foo", new Version(0, 0), string.Empty); 3786TargetPlatformSDK key = new TargetPlatformSDK("Windows", new Version("1.0"), null); 3794key = new TargetPlatformSDK("Windows", new Version("2.0"), null); 3803key = new TargetPlatformSDK("MyPlatform", new Version("6.0"), null); 3806key = new TargetPlatformSDK("MyPlatform", new Version("4.0"), null); 3812key = new TargetPlatformSDK("MyPlatform", new Version("3.0"), null); 3818key = new TargetPlatformSDK("MyPlatform", new Version("2.0"), null); 3824key = new TargetPlatformSDK("MyPlatform", new Version("1.0"), null); 3828key = new TargetPlatformSDK("MyPlatform", new Version("8.0"), null); 3837key = new TargetPlatformSDK("MyPlatform", new Version("9.0"), null); 4057TargetPlatformSDK key = new TargetPlatformSDK("Windows", new Version("1.0"), null); 4060key = new TargetPlatformSDK("Windows", new Version("2.0"), null); 4063key = new TargetPlatformSDK("MyPlatform", new Version("3.0"), null); 4066key = new TargetPlatformSDK("MyPlatform", new Version("2.0"), null); 4069key = new TargetPlatformSDK("MyPlatform", new Version("1.0"), null); 4072key = new TargetPlatformSDK("MyPlatform", new Version("5.0"), null);
94 references to TargetPlatformSDK
Microsoft.Build.Utilities.Core (68)
TargetPlatformSDK.cs (3)
18public class TargetPlatformSDK : IEquatable<TargetPlatformSDK> 154if (!(obj is TargetPlatformSDK moniker)) 170public bool Equals(TargetPlatformSDK other)
ToolLocationHelper.cs (65)
238private static Dictionary<string, IEnumerable<TargetPlatformSDK>> s_cachedTargetPlatforms; 243private static Dictionary<string, TargetPlatformSDK> s_cachedExtensionSdks; 405IEnumerable<TargetPlatformSDK> targetPlatformMonikers = GetTargetPlatformMonikers(diskRoots, extensionDiskRoots, registryRoot, targetPlatformIdentifier, targetPlatformVersion); 406foreach (TargetPlatformSDK moniker in targetPlatformMonikers) 451IEnumerable<TargetPlatformSDK> targetPlatformMonikers = GetTargetPlatformMonikers(diskRoots, multiPlatformDiskRoots, registryRoot, targetPlatformIdentifier, targetPlatformVersion); 453foreach (TargetPlatformSDK moniker in targetPlatformMonikers) 466private static IEnumerable<TargetPlatformSDK> GetTargetPlatformMonikers(string[] diskRoots, string[] extensionDiskRoots, string registryRoot, string targetPlatformIdentifier, Version targetPlatformVersion) 474IEnumerable<TargetPlatformSDK> targetPlatformSDKs = RetrieveTargetPlatformList(diskRoots, extensionDiskRoots, registryRoot); 477.Where<TargetPlatformSDK>(platformSDK => 483.OrderBy<TargetPlatformSDK, Version>(platform => platform.TargetPlatformVersion); 530IEnumerable<TargetPlatformSDK> targetPlatforms = RetrieveTargetPlatformList(diskRoots, extensionDiskRoots, registryRoot); 531var targetPlatformMoniker = targetPlatforms.Where<TargetPlatformSDK>( 539.OrderByDescending<TargetPlatformSDK, Version>(platform => platform.TargetPlatformVersion) 540.DefaultIfEmpty(null).FirstOrDefault<TargetPlatformSDK>(); 766public static IList<TargetPlatformSDK> GetTargetPlatformSdks() => GetTargetPlatformSdks(null, null); 774public static IList<TargetPlatformSDK> GetTargetPlatformSdks(string[] diskRoots, string registryRoot) 776IEnumerable<TargetPlatformSDK> targetPlatforms = RetrieveTargetPlatformList(diskRoots, null, registryRoot); 777return targetPlatforms.Where<TargetPlatformSDK>(platform => platform.Path != null).ToList<TargetPlatformSDK>(); 787public static IList<TargetPlatformSDK> FilterTargetPlatformSdks(IList<TargetPlatformSDK> targetPlatformSdkList, Version osVersion, Version vsVersion) 789var filteredTargetPlatformSdkList = new List<TargetPlatformSDK>(); 791foreach (TargetPlatformSDK targetPlatformSdk in targetPlatformSdkList) 968TargetPlatformSDK matchingSdk = GetMatchingPlatformSDK(targetSdkIdentifier, targetSdkVersion, diskRoots, extensionDiskRoots, registryRoot); 1009private static string GetPlatformVersion(TargetPlatformSDK targetSdk, string targetPlatformIdentifier, string targetPlatformVersion) 1011string platformKey = TargetPlatformSDK.GetSdkKey(targetPlatformIdentifier, targetPlatformVersion); 1091TargetPlatformSDK matchingSdk = GetMatchingPlatformSDK(targetPlatformIdentifier, targetPlatformVersion, diskRoots, null, registryRoot); 1092string platformKey = TargetPlatformSDK.GetSdkKey(targetPlatformIdentifier, targetPlatformVersion); 1154private static bool TryGetPlatformManifest(TargetPlatformSDK matchingSdk, string platformKey, out PlatformManifest manifest) 1232TargetPlatformSDK matchingSdk = GetMatchingPlatformSDK(targetPlatformIdentifier, targetPlatformVersion, diskRoot, null, null); 1233string platformKey = TargetPlatformSDK.GetSdkKey(targetPlatformIdentifier, targetPlatformVersion); 1265var targetPlatform = GetMatchingPlatformSDK(targetPlatformIdentifier, targetPlatformVersion, diskRoots, null, registryRoot); 1317TargetPlatformSDK targetPlatform = GetMatchingPlatformSDK(targetPlatformIdentifier, targetPlatformVersion, diskRoots, null, registryRoot); 1342IEnumerable<TargetPlatformSDK> targetPlatformSDKs = RetrieveTargetPlatformList(diskRoots, null, registryRoot); 1345foreach (TargetPlatformSDK sdk in targetPlatformSDKs) 1560private static TargetPlatformSDK GetMatchingPlatformSDK(string targetPlatformIdentifier, string targetPlatformVersion, string diskRoots, string multiPlatformDiskRoots, string registryRoot) 1588private static TargetPlatformSDK GetMatchingPlatformSDK(string targetPlatformIdentifier, Version targetPlatformVersion, string[] diskRoots, string[] multiPlatformDiskRoots, string registryRoot) 1593IEnumerable<TargetPlatformSDK> targetPlatforms = RetrieveTargetPlatformList(diskRoots, multiPlatformDiskRoots, registryRoot); 1595TargetPlatformSDK matchingSdk = targetPlatforms 1596.FirstOrDefault<TargetPlatformSDK>(platform => 1606matchingSdk = targetPlatforms.FirstOrDefault<TargetPlatformSDK>(platform => platform.ContainsPlatform(targetPlatformIdentifier, versionString)); 2438private static IEnumerable<TargetPlatformSDK> RetrieveTargetPlatformList(string[] diskRoots, string[] extensionDiskRoots, string registrySearchLocation) 2456s_cachedTargetPlatforms = new Dictionary<string, IEnumerable<TargetPlatformSDK>>(StringComparer.OrdinalIgnoreCase); 2461s_cachedExtensionSdks = new Dictionary<string, TargetPlatformSDK>(StringComparer.OrdinalIgnoreCase); 2464if (!s_cachedTargetPlatforms.TryGetValue(cachedTargetPlatformsKey, out IEnumerable<TargetPlatformSDK> collection)) 2466var monikers = new Dictionary<TargetPlatformSDK, TargetPlatformSDK>(); 2480if (!s_cachedExtensionSdks.TryGetValue(cachedExtensionSdksKey, out TargetPlatformSDK extensionSdk)) 2498private static void GatherExtensionSDKListFromDirectory(IEnumerable<string> diskRoots, TargetPlatformSDK extensionSdk) 2525internal static void GatherExtensionSDKs(DirectoryInfo extensionSdksDirectory, TargetPlatformSDK targetPlatformSDK) 2547string SDKKey = TargetPlatformSDK.GetSdkKey(sdkNameFolders.Name, sdkVersionDirectory.Name); 2579internal static void GatherSDKListFromDirectory(List<string> diskroots, Dictionary<TargetPlatformSDK, TargetPlatformSDK> platformSDKs) 2613TargetPlatformSDK platformSDKKey; 2622TargetPlatformSDK targetPlatformSDK = null; 2673internal static void GatherSDKsFromRegistryImpl(Dictionary<TargetPlatformSDK, TargetPlatformSDK> platformMonikers, string registryKeyRoot, RegistryView registryView, RegistryHive registryHive, GetRegistrySubKeyNames getRegistrySubKeyNames, GetRegistrySubKeyDefaultValue getRegistrySubKeyDefaultValue, OpenBaseKey openBaseKey, FileExists fileExists) 2719TargetPlatformSDK platformSDKKey = new TargetPlatformSDK(platformIdentifier, registryVersions.Key, null); 2720TargetPlatformSDK targetPlatformSDK = null; 2815string sdkKey = TargetPlatformSDK.GetSdkKey(sdkName, sdkVersion); 2864private static void GatherSDKListFromRegistry(string registryRoot, Dictionary<TargetPlatformSDK, TargetPlatformSDK> platformMonikers) 3022private static void GatherPlatformsForSdk(TargetPlatformSDK sdk) 3049string sdkKey = TargetPlatformSDK.GetSdkKey(platformIdentifier.Name, platformVersion.Name);
Microsoft.Build.Utilities.UnitTests (26)
ToolLocationHelper_Tests.cs (26)
232TargetPlatformSDK sdk = new TargetPlatformSDK("Foo", new Version(0, 0), string.Empty); 257TargetPlatformSDK sdk = new TargetPlatformSDK("Foo", new Version(0, 0), string.Empty); 283TargetPlatformSDK sdk = new TargetPlatformSDK("Foo", new Version(0, 0), string.Empty); 309TargetPlatformSDK sdk = new TargetPlatformSDK("Foo", new Version(0, 0), string.Empty); 3074var targetPlatform = new Dictionary<TargetPlatformSDK, TargetPlatformSDK>(); 3086var targetPlatform = new Dictionary<TargetPlatformSDK, TargetPlatformSDK>(); 3101var targetPlatform = new Dictionary<TargetPlatformSDK, TargetPlatformSDK>(); 3475IList<TargetPlatformSDK> sdkList = ToolLocationHelper.GetTargetPlatformSdks(new[] { _fakeStructureRoot }, null); 3476IList<TargetPlatformSDK> filteredSdkList = ToolLocationHelper.FilterTargetPlatformSdks(sdkList, new Version(6, 2, 5), new Version(12, 0)); 3477IList<TargetPlatformSDK> filteredSdkList1 = ToolLocationHelper.FilterTargetPlatformSdks(sdkList, new Version(6, 2, 1), new Version(10, 0)); 3478IList<TargetPlatformSDK> filteredSdkList2 = ToolLocationHelper.FilterTargetPlatformSdks(sdkList, new Version(6, 2, 3), new Version(10, 0)); 3479IList<TargetPlatformSDK> filteredSdkList3 = ToolLocationHelper.FilterTargetPlatformSdks(sdkList, new Version(6, 2, 3), new Version(11, 0)); 3482IList<TargetPlatformSDK> filteredSdkList4 = ToolLocationHelper.FilterTargetPlatformSdks(sdkList, new Version(6, 2, 3), null); 3485IList<TargetPlatformSDK> filteredSdkList5 = ToolLocationHelper.FilterTargetPlatformSdks(sdkList, null, new Version(10, 0)); 3488IList<TargetPlatformSDK> filteredSdkList6 = ToolLocationHelper.FilterTargetPlatformSdks(sdkList, null, null); 3782var targetPlatforms = new Dictionary<TargetPlatformSDK, TargetPlatformSDK>(); 3786TargetPlatformSDK key = new TargetPlatformSDK("Windows", new Version("1.0"), null); 4049IList<TargetPlatformSDK> sdks = ToolLocationHelper.GetTargetPlatformSdks(new[] { _fakeStructureRoot }, null); 4051var targetPlatforms = new Dictionary<TargetPlatformSDK, TargetPlatformSDK>(); 4052foreach (TargetPlatformSDK sdk in sdks) 4057TargetPlatformSDK key = new TargetPlatformSDK("Windows", new Version("1.0"), null);