25 instantiations of TargetPlatformSDK
Microsoft.Build.Utilities.Core (6)
ToolLocationHelper.cs (6)
2476extensionSdk = new TargetPlatformSDK(string.Empty, new Version(0, 0), null); 2609platformSDKKey = new TargetPlatformSDK(uapRegistryName, directoryUnderRoot.Key, null); 2613platformSDKKey = new TargetPlatformSDK(rootPathWithIdentifier.Name, directoryUnderRoot.Key, null); 2628targetPlatformSDK = new TargetPlatformSDK(platformSDKKey.TargetPlatformIdentifier, platformSDKKey.TargetPlatformVersion, platformSDKManifestExists ? platformSDKDirectory : null); 2712TargetPlatformSDK platformSDKKey = new TargetPlatformSDK(platformIdentifier, registryVersions.Key, null); 2748targetPlatformSDK = new TargetPlatformSDK(platformSDKKey.TargetPlatformIdentifier, platformSDKKey.TargetPlatformVersion, platformSDKmanifestExists ? platformSDKDirectory : null);
Microsoft.Build.Utilities.UnitTests (19)
ToolLocationHelper_Tests.cs (19)
234TargetPlatformSDK sdk = new TargetPlatformSDK("Foo", new Version(0, 0), string.Empty); 259TargetPlatformSDK sdk = new TargetPlatformSDK("Foo", new Version(0, 0), string.Empty); 285TargetPlatformSDK sdk = new TargetPlatformSDK("Foo", new Version(0, 0), string.Empty); 311TargetPlatformSDK sdk = new TargetPlatformSDK("Foo", new Version(0, 0), string.Empty); 3791TargetPlatformSDK key = new TargetPlatformSDK("Windows", new Version("1.0"), null); 3799key = new TargetPlatformSDK("Windows", new Version("2.0"), null); 3808key = new TargetPlatformSDK("MyPlatform", new Version("6.0"), null); 3811key = new TargetPlatformSDK("MyPlatform", new Version("4.0"), null); 3817key = new TargetPlatformSDK("MyPlatform", new Version("3.0"), null); 3823key = new TargetPlatformSDK("MyPlatform", new Version("2.0"), null); 3829key = new TargetPlatformSDK("MyPlatform", new Version("1.0"), null); 3833key = new TargetPlatformSDK("MyPlatform", new Version("8.0"), null); 3842key = new TargetPlatformSDK("MyPlatform", new Version("9.0"), null); 4062TargetPlatformSDK key = new TargetPlatformSDK("Windows", new Version("1.0"), null); 4065key = new TargetPlatformSDK("Windows", new Version("2.0"), null); 4068key = new TargetPlatformSDK("MyPlatform", new Version("3.0"), null); 4071key = new TargetPlatformSDK("MyPlatform", new Version("2.0"), null); 4074key = new TargetPlatformSDK("MyPlatform", new Version("1.0"), null); 4077key = new TargetPlatformSDK("MyPlatform", new Version("5.0"), null);
94 references to TargetPlatformSDK
Microsoft.Build.Utilities.Core (68)
TargetPlatformSDK.cs (3)
17public class TargetPlatformSDK : IEquatable<TargetPlatformSDK> 153if (!(obj is TargetPlatformSDK moniker)) 169public bool Equals(TargetPlatformSDK other)
ToolLocationHelper.cs (65)
232private static Dictionary<string, IEnumerable<TargetPlatformSDK>> s_cachedTargetPlatforms; 237private static Dictionary<string, TargetPlatformSDK> s_cachedExtensionSdks; 399IEnumerable<TargetPlatformSDK> targetPlatformMonikers = GetTargetPlatformMonikers(diskRoots, extensionDiskRoots, registryRoot, targetPlatformIdentifier, targetPlatformVersion); 400foreach (TargetPlatformSDK moniker in targetPlatformMonikers) 445IEnumerable<TargetPlatformSDK> targetPlatformMonikers = GetTargetPlatformMonikers(diskRoots, multiPlatformDiskRoots, registryRoot, targetPlatformIdentifier, targetPlatformVersion); 447foreach (TargetPlatformSDK moniker in targetPlatformMonikers) 460private static IEnumerable<TargetPlatformSDK> GetTargetPlatformMonikers(string[] diskRoots, string[] extensionDiskRoots, string registryRoot, string targetPlatformIdentifier, Version targetPlatformVersion) 468IEnumerable<TargetPlatformSDK> targetPlatformSDKs = RetrieveTargetPlatformList(diskRoots, extensionDiskRoots, registryRoot); 471.Where<TargetPlatformSDK>(platformSDK => 477.OrderBy<TargetPlatformSDK, Version>(platform => platform.TargetPlatformVersion); 524IEnumerable<TargetPlatformSDK> targetPlatforms = RetrieveTargetPlatformList(diskRoots, extensionDiskRoots, registryRoot); 525var targetPlatformMoniker = targetPlatforms.Where<TargetPlatformSDK>( 533.OrderByDescending<TargetPlatformSDK, Version>(platform => platform.TargetPlatformVersion) 534.DefaultIfEmpty(null).FirstOrDefault<TargetPlatformSDK>(); 760public static IList<TargetPlatformSDK> GetTargetPlatformSdks() => GetTargetPlatformSdks(null, null); 768public static IList<TargetPlatformSDK> GetTargetPlatformSdks(string[] diskRoots, string registryRoot) 770IEnumerable<TargetPlatformSDK> targetPlatforms = RetrieveTargetPlatformList(diskRoots, null, registryRoot); 771return targetPlatforms.Where<TargetPlatformSDK>(platform => platform.Path != null).ToList<TargetPlatformSDK>(); 781public static IList<TargetPlatformSDK> FilterTargetPlatformSdks(IList<TargetPlatformSDK> targetPlatformSdkList, Version osVersion, Version vsVersion) 783var filteredTargetPlatformSdkList = new List<TargetPlatformSDK>(); 785foreach (TargetPlatformSDK targetPlatformSdk in targetPlatformSdkList) 962TargetPlatformSDK matchingSdk = GetMatchingPlatformSDK(targetSdkIdentifier, targetSdkVersion, diskRoots, extensionDiskRoots, registryRoot); 1003private static string GetPlatformVersion(TargetPlatformSDK targetSdk, string targetPlatformIdentifier, string targetPlatformVersion) 1005string platformKey = TargetPlatformSDK.GetSdkKey(targetPlatformIdentifier, targetPlatformVersion); 1085TargetPlatformSDK matchingSdk = GetMatchingPlatformSDK(targetPlatformIdentifier, targetPlatformVersion, diskRoots, null, registryRoot); 1086string platformKey = TargetPlatformSDK.GetSdkKey(targetPlatformIdentifier, targetPlatformVersion); 1148private static bool TryGetPlatformManifest(TargetPlatformSDK matchingSdk, string platformKey, out PlatformManifest manifest) 1226TargetPlatformSDK matchingSdk = GetMatchingPlatformSDK(targetPlatformIdentifier, targetPlatformVersion, diskRoot, null, null); 1227string platformKey = TargetPlatformSDK.GetSdkKey(targetPlatformIdentifier, targetPlatformVersion); 1259var targetPlatform = GetMatchingPlatformSDK(targetPlatformIdentifier, targetPlatformVersion, diskRoots, null, registryRoot); 1311TargetPlatformSDK targetPlatform = GetMatchingPlatformSDK(targetPlatformIdentifier, targetPlatformVersion, diskRoots, null, registryRoot); 1336IEnumerable<TargetPlatformSDK> targetPlatformSDKs = RetrieveTargetPlatformList(diskRoots, null, registryRoot); 1339foreach (TargetPlatformSDK sdk in targetPlatformSDKs) 1554private static TargetPlatformSDK GetMatchingPlatformSDK(string targetPlatformIdentifier, string targetPlatformVersion, string diskRoots, string multiPlatformDiskRoots, string registryRoot) 1582private static TargetPlatformSDK GetMatchingPlatformSDK(string targetPlatformIdentifier, Version targetPlatformVersion, string[] diskRoots, string[] multiPlatformDiskRoots, string registryRoot) 1587IEnumerable<TargetPlatformSDK> targetPlatforms = RetrieveTargetPlatformList(diskRoots, multiPlatformDiskRoots, registryRoot); 1589TargetPlatformSDK matchingSdk = targetPlatforms 1590.FirstOrDefault<TargetPlatformSDK>(platform => 1600matchingSdk = targetPlatforms.FirstOrDefault<TargetPlatformSDK>(platform => platform.ContainsPlatform(targetPlatformIdentifier, versionString)); 2431private static IEnumerable<TargetPlatformSDK> RetrieveTargetPlatformList(string[] diskRoots, string[] extensionDiskRoots, string registrySearchLocation) 2449s_cachedTargetPlatforms = new Dictionary<string, IEnumerable<TargetPlatformSDK>>(StringComparer.OrdinalIgnoreCase); 2454s_cachedExtensionSdks = new Dictionary<string, TargetPlatformSDK>(StringComparer.OrdinalIgnoreCase); 2457if (!s_cachedTargetPlatforms.TryGetValue(cachedTargetPlatformsKey, out IEnumerable<TargetPlatformSDK> collection)) 2459var monikers = new Dictionary<TargetPlatformSDK, TargetPlatformSDK>(); 2473if (!s_cachedExtensionSdks.TryGetValue(cachedExtensionSdksKey, out TargetPlatformSDK extensionSdk)) 2491private static void GatherExtensionSDKListFromDirectory(IEnumerable<string> diskRoots, TargetPlatformSDK extensionSdk) 2518internal static void GatherExtensionSDKs(DirectoryInfo extensionSdksDirectory, TargetPlatformSDK targetPlatformSDK) 2540string SDKKey = TargetPlatformSDK.GetSdkKey(sdkNameFolders.Name, sdkVersionDirectory.Name); 2572internal static void GatherSDKListFromDirectory(List<string> diskroots, Dictionary<TargetPlatformSDK, TargetPlatformSDK> platformSDKs) 2606TargetPlatformSDK platformSDKKey; 2615TargetPlatformSDK targetPlatformSDK = null; 2666internal static void GatherSDKsFromRegistryImpl(Dictionary<TargetPlatformSDK, TargetPlatformSDK> platformMonikers, string registryKeyRoot, RegistryView registryView, RegistryHive registryHive, GetRegistrySubKeyNames getRegistrySubKeyNames, GetRegistrySubKeyDefaultValue getRegistrySubKeyDefaultValue, OpenBaseKey openBaseKey, FileExists fileExists) 2712TargetPlatformSDK platformSDKKey = new TargetPlatformSDK(platformIdentifier, registryVersions.Key, null); 2713TargetPlatformSDK targetPlatformSDK = null; 2808string sdkKey = TargetPlatformSDK.GetSdkKey(sdkName, sdkVersion); 2857private static void GatherSDKListFromRegistry(string registryRoot, Dictionary<TargetPlatformSDK, TargetPlatformSDK> platformMonikers) 3015private static void GatherPlatformsForSdk(TargetPlatformSDK sdk) 3042string sdkKey = TargetPlatformSDK.GetSdkKey(platformIdentifier.Name, platformVersion.Name);
Microsoft.Build.Utilities.UnitTests (26)
ToolLocationHelper_Tests.cs (26)
234TargetPlatformSDK sdk = new TargetPlatformSDK("Foo", new Version(0, 0), string.Empty); 259TargetPlatformSDK sdk = new TargetPlatformSDK("Foo", new Version(0, 0), string.Empty); 285TargetPlatformSDK sdk = new TargetPlatformSDK("Foo", new Version(0, 0), string.Empty); 311TargetPlatformSDK sdk = new TargetPlatformSDK("Foo", new Version(0, 0), string.Empty); 3079var targetPlatform = new Dictionary<TargetPlatformSDK, TargetPlatformSDK>(); 3091var targetPlatform = new Dictionary<TargetPlatformSDK, TargetPlatformSDK>(); 3106var targetPlatform = new Dictionary<TargetPlatformSDK, TargetPlatformSDK>(); 3480IList<TargetPlatformSDK> sdkList = ToolLocationHelper.GetTargetPlatformSdks(new[] { _fakeStructureRoot }, null); 3481IList<TargetPlatformSDK> filteredSdkList = ToolLocationHelper.FilterTargetPlatformSdks(sdkList, new Version(6, 2, 5), new Version(12, 0)); 3482IList<TargetPlatformSDK> filteredSdkList1 = ToolLocationHelper.FilterTargetPlatformSdks(sdkList, new Version(6, 2, 1), new Version(10, 0)); 3483IList<TargetPlatformSDK> filteredSdkList2 = ToolLocationHelper.FilterTargetPlatformSdks(sdkList, new Version(6, 2, 3), new Version(10, 0)); 3484IList<TargetPlatformSDK> filteredSdkList3 = ToolLocationHelper.FilterTargetPlatformSdks(sdkList, new Version(6, 2, 3), new Version(11, 0)); 3487IList<TargetPlatformSDK> filteredSdkList4 = ToolLocationHelper.FilterTargetPlatformSdks(sdkList, new Version(6, 2, 3), null); 3490IList<TargetPlatformSDK> filteredSdkList5 = ToolLocationHelper.FilterTargetPlatformSdks(sdkList, null, new Version(10, 0)); 3493IList<TargetPlatformSDK> filteredSdkList6 = ToolLocationHelper.FilterTargetPlatformSdks(sdkList, null, null); 3787var targetPlatforms = new Dictionary<TargetPlatformSDK, TargetPlatformSDK>(); 3791TargetPlatformSDK key = new TargetPlatformSDK("Windows", new Version("1.0"), null); 4054IList<TargetPlatformSDK> sdks = ToolLocationHelper.GetTargetPlatformSdks(new[] { _fakeStructureRoot }, null); 4056var targetPlatforms = new Dictionary<TargetPlatformSDK, TargetPlatformSDK>(); 4057foreach (TargetPlatformSDK sdk in sdks) 4062TargetPlatformSDK key = new TargetPlatformSDK("Windows", new Version("1.0"), null);