// AddPartCacheResult is moved to TargetPlatformResolver /*Telerik Authorship*/ private IEnumerable <string> ResolveNetCoreReferences(AssemblyName assemblyName) { List <string> targetDirectories = null; foreach (var ver in assemblyName.SupportedVersions(TargetPlatform.NetCore)) { targetDirectories = new List <string>(); if (Directory.Exists(SystemInformation.NetCoreX64SharedAssemblies)) { targetDirectories.AddRange(Directory.GetDirectories(SystemInformation.NetCoreX64SharedAssemblies, ver + "*")); } if (Directory.Exists(SystemInformation.NetCoreX86SharedAssemblies)) { targetDirectories.AddRange(Directory.GetDirectories(SystemInformation.NetCoreX86SharedAssemblies, ver + "*")); } foreach (string dirVersions in targetDirectories) { string searchPattern = string.Format("{0}\\{1}.dll", dirVersions, assemblyName.Name); if (CheckFileExistence(assemblyName, searchPattern, true, true)) { yield return(searchPattern); } } } }
private IEnumerable <string> ResolveCompact(AssemblyName assemblyName) { foreach (var ver in assemblyName.SupportedVersions(TargetPlatform.WindowsCE)) { var searchPattern = string.Format(SystemInformation.COMPACT_FRAMEWORK, SystemInformation.ProgramFilesX86, ver, assemblyName.Name); if (CheckFileExistence(assemblyName, searchPattern, true, false)) { yield return(searchPattern); } } }
private IEnumerable <string> ResolveSilverlightPath(AssemblyName assemblyName, string path) { foreach (var version in assemblyName.SupportedVersions(TargetPlatform.Silverlight)) { string searchPattern = string.Format(path, SystemInformation.ProgramFilesX86, version, assemblyName.Name); if (CheckFileExistence(assemblyName, searchPattern, true, true)) { yield return(searchPattern); } } }
private IEnumerable <string> ResolveClr(AssemblyName assemblyName, TargetPlatform clrRuntime) { var result = new List <string>(); string versionMajor = string.Format("v{0}*", (clrRuntime == TargetPlatform.CLR_4 ? 4 : 2)); var targetDirectories = new List <string>(); if (Directory.Exists(SystemInformation.CLR_Default_32)) { targetDirectories.AddRange(Directory.GetDirectories(SystemInformation.CLR_Default_32, versionMajor)); } if (Directory.Exists(SystemInformation.CLR_Default_64)) { targetDirectories.AddRange(Directory.GetDirectories(SystemInformation.CLR_Default_64, versionMajor)); } foreach (var dir in targetDirectories) { foreach (string extension in SystemInformation.ResolvableExtensions) { string filePath = dir + "\\" + assemblyName.Name + extension; if (CheckFileExistence(assemblyName, filePath, true, false)) { result.Add(filePath); } } } var searchPattern = clrRuntime == TargetPlatform.CLR_4 ? SystemInformation.CLR_4 : SystemInformation.CLR; foreach (var targetRuntime in assemblyName.SupportedVersions(clrRuntime)) { foreach (var extension in SystemInformation.ResolvableExtensions) { string filePath = string.Format(searchPattern, SystemInformation.WindowsPath, targetRuntime, assemblyName.Name, assemblyName.ParentDirectory(clrRuntime), assemblyName.Name, extension); if (CheckFileExistence(assemblyName, filePath, true, false)) { result.Add(filePath); } } } return(result); }
// AddPartCacheResult is moved to TargetPlatformResolver /*Telerik Authorship*/ private IEnumerable <string> ResolveNetCoreReferences(AssemblyName assemblyName) { /* AGPL */ foreach (string ver in assemblyName.SupportedVersions(TargetPlatform.NetCore)) { foreach (string dirVersions in SystemInformation.GetNetCoreSharedAssemblyDirectories(ver)) { string searchPattern = Path.Combine(dirVersions, $"{assemblyName.Name}.dll"); /* End AGPL */ if (CheckFileExistence(assemblyName, searchPattern, true, true)) { yield return(searchPattern); } } } }
private IEnumerable <string> ResolveWP(AssemblyName assemblyName) { foreach (var version in assemblyName.SupportedVersions(TargetPlatform.WindowsPhone)) { string windowsPhoneDir = string.Format(@"{0}\Reference Assemblies\Microsoft\Framework\Silverlight\{1}\Profile\", SystemInformation.ProgramFilesX86, version); if (Directory.Exists(windowsPhoneDir)) { foreach (string dirVersions in Directory.GetDirectories(windowsPhoneDir, "WindowsPhone*.")) { string searchPattern = string.Format("{0}\\{1}.dll", dirVersions, assemblyName.Name); if (CheckFileExistence(assemblyName, searchPattern, true, true)) { yield return(searchPattern); } } } } }
/*Telerik Authorship*/ private IEnumerable <string> ResolveNetCoreReferences(AssemblyName assemblyName) { List <string> targetDirectories = null; string sharedAssembliesPath = string.Empty; foreach (var ver in assemblyName.SupportedVersions(TargetPlatform.NetCore)) { targetDirectories = new List <string>(); if (Directory.Exists(SystemInformation.NETCORE_DIRECTORY)) { sharedAssembliesPath = Path.Combine(SystemInformation.NETCORE_DIRECTORY, @"shared\Microsoft.NETCore.App\"); if (Directory.Exists(sharedAssembliesPath)) { targetDirectories.AddRange(Directory.GetDirectories(sharedAssembliesPath, ver + "*")); } } if (Directory.Exists(SystemInformation.NETCORE_X86_DIRECTORY)) { sharedAssembliesPath = Path.Combine(SystemInformation.NETCORE_X86_DIRECTORY, @"shared\Microsoft.NETCore.App\"); if (Directory.Exists(sharedAssembliesPath)) { targetDirectories.AddRange(Directory.GetDirectories(sharedAssembliesPath, ver + "*")); } } foreach (string dirVersions in targetDirectories) { string searchPattern = string.Format("{0}\\{1}.dll", dirVersions, assemblyName.Name); if (CheckFileExistence(assemblyName, searchPattern, true, true)) { yield return(searchPattern); } } } }
private IEnumerable<string> ResolveClr(AssemblyName assemblyName, TargetPlatform clrRuntime) { var result = new List<string>(); string versionMajor = string.Format("v{0}*", (clrRuntime == TargetPlatform.CLR_4 ? 4 : 2)); var targetDirectories = new List<string>(); if (Directory.Exists(SystemInformation.CLR_Default_32)) { targetDirectories.AddRange(Directory.GetDirectories(SystemInformation.CLR_Default_32, versionMajor)); } if (Directory.Exists(SystemInformation.CLR_Default_64)) { targetDirectories.AddRange(Directory.GetDirectories(SystemInformation.CLR_Default_64, versionMajor)); } foreach (var dir in targetDirectories) { foreach (string extension in SystemInformation.ResolvableExtensions) { string filePath = dir + "\\" + assemblyName.Name + extension; if (CheckFileExistence(assemblyName, filePath, true, false)) { result.Add(filePath); } } } var searchPattern = clrRuntime == TargetPlatform.CLR_4 ? SystemInformation.CLR_4 : SystemInformation.CLR; foreach (var targetRuntime in assemblyName.SupportedVersions(clrRuntime)) { foreach (var extension in SystemInformation.ResolvableExtensions) { string filePath = string.Format(searchPattern, SystemInformation.WindowsPath, targetRuntime, assemblyName.Name, assemblyName.ParentDirectory(clrRuntime), assemblyName.Name, extension); if (CheckFileExistence(assemblyName, filePath, true, false)) { result.Add(filePath); } } } return result; }
private IEnumerable<string> ResolveWP(AssemblyName assemblyName) { foreach (var version in assemblyName.SupportedVersions(TargetPlatform.WindowsPhone)) { string windowsPhoneDir = string.Format(@"{0}\Reference Assemblies\Microsoft\Framework\Silverlight\{1}\Profile\", SystemInformation.ProgramFilesX86, version); if (Directory.Exists(windowsPhoneDir)) { foreach (string dirVersions in Directory.GetDirectories(windowsPhoneDir, "WindowsPhone*.")) { string searchPattern = string.Format("{0}\\{1}.dll", dirVersions, assemblyName.Name); if (CheckFileExistence(assemblyName, searchPattern, true, true)) { yield return searchPattern; } } } } }
private IEnumerable<string> ResolveCompact(AssemblyName assemblyName) { foreach (var ver in assemblyName.SupportedVersions(TargetPlatform.WindowsCE)) { var searchPattern = string.Format(SystemInformation.COMPACT_FRAMEWORK, SystemInformation.ProgramFilesX86, ver, assemblyName.Name); if (CheckFileExistence(assemblyName, searchPattern, true, false)) { yield return searchPattern; } } }
private IEnumerable<string> ResolveSilverlightPath(AssemblyName assemblyName, string path) { foreach (var version in assemblyName.SupportedVersions(TargetPlatform.Silverlight)) { string searchPattern = string.Format(path, SystemInformation.ProgramFilesX86, version, assemblyName.Name); if (CheckFileExistence(assemblyName, searchPattern, true, true)) { yield return searchPattern; } } }