From 81811efe971c7a2d2aee69ed336d38de95e8e5fa Mon Sep 17 00:00:00 2001 From: Jerome Haltom Date: Wed, 11 Sep 2024 13:54:22 -0500 Subject: [PATCH] Use [] instead of Add. Should not throw. --- src/IKVM.Runtime/JVM.Properties.cs | 692 ++++++++++++++--------------- 1 file changed, 346 insertions(+), 346 deletions(-) diff --git a/src/IKVM.Runtime/JVM.Properties.cs b/src/IKVM.Runtime/JVM.Properties.cs index 0efbd1fa2..bb8174e17 100644 --- a/src/IKVM.Runtime/JVM.Properties.cs +++ b/src/IKVM.Runtime/JVM.Properties.cs @@ -11,122 +11,122 @@ namespace IKVM.Runtime { - static partial class JVM - { - - /// - /// Property values loaded into the JVM from various sources. - /// - public static class Properties - { - - /// - /// Represents an entry in the IKVM properties. - /// - internal record struct IkvmPropEntry(string BasePath, string Value); - - static readonly IDictionary user = new Dictionary(); - static readonly Lazy> ikvm = new Lazy>(GetIkvmProperties); - static readonly Lazy> init = new Lazy>(GetInitProperties); - static readonly Lazy homePath = new Lazy(GetHomePath); - - /// - /// Gets the set of properties that are set by the user before initialization. Modification of values in this - /// dictionary must happen early in the program's initialization before any Java code has been accessed or - /// run. - /// - public static IDictionary User => user; - - /// - /// Gets the set of properties that are set in the 'ikvm.properties' file before initialization. - /// - internal static IReadOnlyDictionary Ikvm => ikvm.Value; - - /// - /// Gets the set of properties that are initialized with the JVM and provided to the JDK. - /// - internal static IReadOnlyDictionary Init => init.Value; - - /// - /// Gets the home path. - /// - internal static string HomePath => homePath.Value; - - /// - /// Gets the raw search paths to examine for ikvm.properties. - /// - /// - static IEnumerable GetIkvmPropertiesSearchPathsIter() - { - if (AppContext.BaseDirectory is string basePath && !string.IsNullOrEmpty(basePath)) - yield return basePath; - - if (AppDomain.CurrentDomain.BaseDirectory is string appBasePath && !string.IsNullOrEmpty(appBasePath)) - yield return appBasePath; - - // search upwards from the location of IKVM.Runtime - // we do this because IKVM.Runtime may be in runtimes/{rid}/lib - if (typeof(Properties).Assembly.Location is string runtimeAssemblyPath && !string.IsNullOrEmpty(runtimeAssemblyPath)) - foreach (var parent in GetParentDirs(runtimeAssemblyPath)) - yield return parent; - } - - /// - /// Returns an iteration of each parent path of the given path until the root. - /// - /// - /// - static IEnumerable GetParentDirs(string path) - { - while (string.IsNullOrWhiteSpace(path = Path.GetDirectoryName(path)) == false) - yield return path; - } - - /// - /// Gets the unique search paths to examine for ikvm.properties. - /// - /// - static IEnumerable GetIkvmPropertiesSearchPaths() - { - return GetIkvmPropertiesSearchPathsIter().Distinct(); - } - - /// - /// Gets the set of properties loaded from any companion 'ikvm.properties' file. - /// - /// - static Dictionary GetIkvmProperties() - { - var props = new Dictionary(); - - foreach (var basePath in GetIkvmPropertiesSearchPaths()) - { - var ikvmPropertiesPath = Path.Combine(basePath, "ikvm.properties"); - if (File.Exists(ikvmPropertiesPath)) - { - LoadProperties(basePath, File.ReadAllLines(ikvmPropertiesPath), props); - break; - } - } - - return props; - } - - /// - /// Gets the home path for IKVM. - /// - /// - static string GetHomePath() - { - // user value takes priority - if (User.TryGetValue("ikvm.home", out var userHomePath) && !string.IsNullOrWhiteSpace(userHomePath)) - if (Directory.Exists(Path.GetFullPath(Path.Combine(AppContext.BaseDirectory, userHomePath)))) - return Path.GetFullPath(Path.Combine(AppContext.BaseDirectory, userHomePath)); - - // ikvm properties value comes next - if (Ikvm.TryGetValue("ikvm.home", out var ikvmHomeEntry) && !string.IsNullOrWhiteSpace(ikvmHomeEntry.Value)) - if (Directory.Exists(Path.GetFullPath(Path.Combine(ikvmHomeEntry.BasePath, ikvmHomeEntry.Value)))) - return Path.GetFullPath(Path.Combine(ikvmHomeEntry.BasePath, ikvmHomeEntry.Value)); + static partial class JVM + { + + /// + /// Property values loaded into the JVM from various sources. + /// + public static class Properties + { + + /// + /// Represents an entry in the IKVM properties. + /// + internal record struct IkvmPropEntry(string BasePath, string Value); + + static readonly IDictionary user = new Dictionary(); + static readonly Lazy> ikvm = new Lazy>(GetIkvmProperties); + static readonly Lazy> init = new Lazy>(GetInitProperties); + static readonly Lazy homePath = new Lazy(GetHomePath); + + /// + /// Gets the set of properties that are set by the user before initialization. Modification of values in this + /// dictionary must happen early in the program's initialization before any Java code has been accessed or + /// run. + /// + public static IDictionary User => user; + + /// + /// Gets the set of properties that are set in the 'ikvm.properties' file before initialization. + /// + internal static IReadOnlyDictionary Ikvm => ikvm.Value; + + /// + /// Gets the set of properties that are initialized with the JVM and provided to the JDK. + /// + internal static IReadOnlyDictionary Init => init.Value; + + /// + /// Gets the home path. + /// + internal static string HomePath => homePath.Value; + + /// + /// Gets the raw search paths to examine for ikvm.properties. + /// + /// + static IEnumerable GetIkvmPropertiesSearchPathsIter() + { + if (AppContext.BaseDirectory is string basePath && !string.IsNullOrEmpty(basePath)) + yield return basePath; + + if (AppDomain.CurrentDomain.BaseDirectory is string appBasePath && !string.IsNullOrEmpty(appBasePath)) + yield return appBasePath; + + // search upwards from the location of IKVM.Runtime + // we do this because IKVM.Runtime may be in runtimes/{rid}/lib + if (typeof(Properties).Assembly.Location is string runtimeAssemblyPath && !string.IsNullOrEmpty(runtimeAssemblyPath)) + foreach (var parent in GetParentDirs(runtimeAssemblyPath)) + yield return parent; + } + + /// + /// Returns an iteration of each parent path of the given path until the root. + /// + /// + /// + static IEnumerable GetParentDirs(string path) + { + while (string.IsNullOrWhiteSpace(path = Path.GetDirectoryName(path)) == false) + yield return path; + } + + /// + /// Gets the unique search paths to examine for ikvm.properties. + /// + /// + static IEnumerable GetIkvmPropertiesSearchPaths() + { + return GetIkvmPropertiesSearchPathsIter().Distinct(); + } + + /// + /// Gets the set of properties loaded from any companion 'ikvm.properties' file. + /// + /// + static Dictionary GetIkvmProperties() + { + var props = new Dictionary(); + + foreach (var basePath in GetIkvmPropertiesSearchPaths()) + { + var ikvmPropertiesPath = Path.Combine(basePath, "ikvm.properties"); + if (File.Exists(ikvmPropertiesPath)) + { + LoadProperties(basePath, File.ReadAllLines(ikvmPropertiesPath), props); + break; + } + } + + return props; + } + + /// + /// Gets the home path for IKVM. + /// + /// + static string GetHomePath() + { + // user value takes priority + if (User.TryGetValue("ikvm.home", out var userHomePath) && !string.IsNullOrWhiteSpace(userHomePath)) + if (Directory.Exists(Path.GetFullPath(Path.Combine(AppContext.BaseDirectory, userHomePath)))) + return Path.GetFullPath(Path.Combine(AppContext.BaseDirectory, userHomePath)); + + // ikvm properties value comes next + if (Ikvm.TryGetValue("ikvm.home", out var ikvmHomeEntry) && !string.IsNullOrWhiteSpace(ikvmHomeEntry.Value)) + if (Directory.Exists(Path.GetFullPath(Path.Combine(ikvmHomeEntry.BasePath, ikvmHomeEntry.Value)))) + return Path.GetFullPath(Path.Combine(ikvmHomeEntry.BasePath, ikvmHomeEntry.Value)); #if NETFRAMEWORK // attempt to find settings in legacy app.config @@ -143,15 +143,15 @@ static string GetHomePath() } #endif - // find first occurance of home root - if (User.TryGetValue("ikvm.home.root", out var userHomeRoot) && !string.IsNullOrWhiteSpace(userHomeRoot)) - if (ResolveHomePathFromRoot(Path.GetFullPath(Path.Combine(AppContext.BaseDirectory, userHomeRoot))) is string userHomeRootPath) - return userHomeRootPath; + // find first occurance of home root + if (User.TryGetValue("ikvm.home.root", out var userHomeRoot) && !string.IsNullOrWhiteSpace(userHomeRoot)) + if (ResolveHomePathFromRoot(Path.GetFullPath(Path.Combine(AppContext.BaseDirectory, userHomeRoot))) is string userHomeRootPath) + return userHomeRootPath; - // ikvm properties value comes next - if (Ikvm.TryGetValue("ikvm.home.root", out var ikvmHomeRootEntry) && !string.IsNullOrWhiteSpace(ikvmHomeRootEntry.Value)) - if (ResolveHomePathFromRoot(Path.GetFullPath(Path.Combine(ikvmHomeRootEntry.BasePath, ikvmHomeRootEntry.Value))) is string ikvmHomeRootPath) - return ikvmHomeRootPath; + // ikvm properties value comes next + if (Ikvm.TryGetValue("ikvm.home.root", out var ikvmHomeRootEntry) && !string.IsNullOrWhiteSpace(ikvmHomeRootEntry.Value)) + if (ResolveHomePathFromRoot(Path.GetFullPath(Path.Combine(ikvmHomeRootEntry.BasePath, ikvmHomeRootEntry.Value))) is string ikvmHomeRootPath) + return ikvmHomeRootPath; #if NETFRAMEWORK // attempt to find settings in legacy app.config @@ -168,106 +168,106 @@ static string GetHomePath() } #endif - // fallback to directory in base dir - if (string.IsNullOrWhiteSpace(AppContext.BaseDirectory) == false) - if (ResolveHomePathFromRoot(Path.GetFullPath(Path.Combine(AppContext.BaseDirectory, "ikvm"))) is string appHomeRootPath) - return appHomeRootPath; - - // fallback to directory in base dir - if (string.IsNullOrWhiteSpace(AppDomain.CurrentDomain.BaseDirectory) == false) - if (ResolveHomePathFromRoot(Path.GetFullPath(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "ikvm"))) is string domainHomeRootPath) - return domainHomeRootPath; - - throw new InternalException("Could not locate ikvm home path."); - } - - /// - /// Scans the given root path for the home for the currently executing runtime. - /// - /// - /// - static string ResolveHomePathFromRoot(string homePathRoot) - { - // calculate ikvm.home from ikvm.home.root - if (Directory.Exists(homePathRoot)) - { - foreach (var rid in RuntimeUtil.SupportedRuntimeIdentifiers) - { - var ikvmHomePath = Path.GetFullPath(Path.Combine(homePathRoot, rid)); - if (Directory.Exists(ikvmHomePath)) - return ikvmHomePath; - } - } - - return null; - } - - /// - /// Reads the property lines from the specified file into the dictionary. - /// - /// - /// - static void LoadProperties(string basePath, IEnumerable lines, Dictionary props) - { - foreach (var l in lines) - { - var a = l.Split(new[] { '=' }, 2, StringSplitOptions.RemoveEmptyEntries); - if (a.Length >= 2) - props[a[0].Trim()] = new IkvmPropEntry(basePath, a[1]?.Trim() ?? ""); - } - } - - /// - /// Gets the set of init properties. - /// - /// - static Dictionary GetInitProperties() - { + // fallback to directory in base dir + if (string.IsNullOrWhiteSpace(AppContext.BaseDirectory) == false) + if (ResolveHomePathFromRoot(Path.GetFullPath(Path.Combine(AppContext.BaseDirectory, "ikvm"))) is string appHomeRootPath) + return appHomeRootPath; + + // fallback to directory in base dir + if (string.IsNullOrWhiteSpace(AppDomain.CurrentDomain.BaseDirectory) == false) + if (ResolveHomePathFromRoot(Path.GetFullPath(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "ikvm"))) is string domainHomeRootPath) + return domainHomeRootPath; + + throw new InternalException("Could not locate ikvm home path."); + } + + /// + /// Scans the given root path for the home for the currently executing runtime. + /// + /// + /// + static string ResolveHomePathFromRoot(string homePathRoot) + { + // calculate ikvm.home from ikvm.home.root + if (Directory.Exists(homePathRoot)) + { + foreach (var rid in RuntimeUtil.SupportedRuntimeIdentifiers) + { + var ikvmHomePath = Path.GetFullPath(Path.Combine(homePathRoot, rid)); + if (Directory.Exists(ikvmHomePath)) + return ikvmHomePath; + } + } + + return null; + } + + /// + /// Reads the property lines from the specified file into the dictionary. + /// + /// + /// + static void LoadProperties(string basePath, IEnumerable lines, Dictionary props) + { + foreach (var l in lines) + { + var a = l.Split(new[] { '=' }, 2, StringSplitOptions.RemoveEmptyEntries); + if (a.Length >= 2) + props[a[0].Trim()] = new IkvmPropEntry(basePath, a[1]?.Trim() ?? ""); + } + } + + /// + /// Gets the set of init properties. + /// + /// + static Dictionary GetInitProperties() + { #if FIRST_PASS || IMPORTER || EXPORTER throw new NotImplementedException(); #else - var p = new Dictionary(); - InitSystemProperties(p); - return p; + var p = new Dictionary(); + InitSystemProperties(p); + return p; #endif - } - - /// - /// Initialize system properties key and value. - /// - /// - static void InitSystemProperties(Dictionary p) - { + } + + /// + /// Initialize system properties key and value. + /// + /// + static void InitSystemProperties(Dictionary p) + { #if FIRST_PASS || IMPORTER || EXPORTER throw new NotImplementedException(); #else - p["openjdk.version"] = Constants.openjdk_version; - p["java.vm.name"] = Constants.java_vm_name; - p["java.vm.version"] = Constants.java_vm_version; - p["java.vm.vendor"] = Constants.java_vm_vendor; - p["java.vm.specification.name"] = "Java Virtual Machine Specification"; - p["java.vm.specification.version"] = Constants.java_vm_specification_version; - p["java.vm.specification.vendor"] = Constants.java_vm_specification_vendor; - p["java.vm.info"] = "compiled mode"; - p["java.runtime.name"] = Constants.java_runtime_name; - p["java.runtime.version"] = Constants.java_runtime_version; - - // various directory paths - p["ikvm.home"] = HomePath; - p["java.home"] = HomePath; - p["java.library.path"] = GetLibraryPath(); - p["java.ext.dirs"] = Path.Combine(HomePath, "lib", "ext"); - p["java.endorsed.dirs"] = Path.Combine(HomePath, "lib", "endorsed"); - p["sun.boot.library.path"] = GetBootLibraryPath(); - p["sun.boot.class.path"] = VfsTable.GetAssemblyClassesPath(Vfs.Context, Context.Resolver.ResolveBaseAssembly(), HomePath); - p["sun.cds.enableSharedLookupCache"] = "false"; - - // unlimited direct memory - p["sun.nio.MaxDirectMemorySize"] = "-1"; - - // default to FORK on OSX, instead of posix_spawn with jspawnhelper - if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) - p["jdk.lang.Process.launchMechanism"] = "FORK"; + p["openjdk.version"] = Constants.openjdk_version; + p["java.vm.name"] = Constants.java_vm_name; + p["java.vm.version"] = Constants.java_vm_version; + p["java.vm.vendor"] = Constants.java_vm_vendor; + p["java.vm.specification.name"] = "Java Virtual Machine Specification"; + p["java.vm.specification.version"] = Constants.java_vm_specification_version; + p["java.vm.specification.vendor"] = Constants.java_vm_specification_vendor; + p["java.vm.info"] = "compiled mode"; + p["java.runtime.name"] = Constants.java_runtime_name; + p["java.runtime.version"] = Constants.java_runtime_version; + + // various directory paths + p["ikvm.home"] = HomePath; + p["java.home"] = HomePath; + p["java.library.path"] = GetLibraryPath(); + p["java.ext.dirs"] = Path.Combine(HomePath, "lib", "ext"); + p["java.endorsed.dirs"] = Path.Combine(HomePath, "lib", "endorsed"); + p["sun.boot.library.path"] = GetBootLibraryPath(); + p["sun.boot.class.path"] = VfsTable.GetAssemblyClassesPath(Vfs.Context, Context.Resolver.ResolveBaseAssembly(), HomePath); + p["sun.cds.enableSharedLookupCache"] = "false"; + + // unlimited direct memory + p["sun.nio.MaxDirectMemorySize"] = "-1"; + + // default to FORK on OSX, instead of posix_spawn with jspawnhelper + if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) + p["jdk.lang.Process.launchMechanism"] = "FORK"; #if NETFRAMEWORK // read properties from app.config @@ -275,7 +275,7 @@ static void InitSystemProperties(Dictionary p) { foreach (string key in ConfigurationManager.AppSettings) if (key.StartsWith("ikvm:")) - p.Add(key.Substring(5), ConfigurationManager.AppSettings[key]); + p[key.Substring(5)] = ConfigurationManager.AppSettings[key]; } catch (ConfigurationException) { @@ -283,138 +283,138 @@ static void InitSystemProperties(Dictionary p) } #endif - // set the properties that were specfied - if (user != null) - foreach (var kvp in user) - p[kvp.Key] = kvp.Value; + // set the properties that were specfied + if (user != null) + foreach (var kvp in user) + p[kvp.Key] = kvp.Value; #endif - } - - /// - /// Gets the path string for loading native libraries. - /// - /// - static string GetLibraryPath() - { + } + + /// + /// Gets the path string for loading native libraries. + /// + /// + static string GetLibraryPath() + { #if FIRST_PASS || IMPORTER || EXPORTER throw new NotImplementedException(); #else - var libraryPath = new List(); - - if (RuntimeUtil.IsWindows) - { - // see /hotspot/src/os/windows/vm/os_windows.cpp for the comment that describes how we build the path - var windir = SafeGetEnvironmentVariable("SystemRoot"); - if (windir != null) - libraryPath.Add(Path.Combine(windir, "Sun", "Java", "bin")); - - try - { - libraryPath.Add(Environment.SystemDirectory); - } - catch (SecurityException) - { - - } - - if (windir != null) - libraryPath.Add(windir); - - var path = SafeGetEnvironmentVariable("PATH"); - if (path != null) - foreach (var i in path.Split(Path.PathSeparator)) - libraryPath.Add(i); - } - - if (RuntimeUtil.IsLinux) - { - // on Linux we have some hardcoded paths (from /hotspot/src/os/linux/vm/os_linux.cpp) - // and we can only guess the cpu arch based on bitness (that means only x86 and x64) - libraryPath.Add(Path.Combine("/usr/java/packages/lib/", IntPtr.Size == 4 ? "i386" : "amd64")); - libraryPath.Add("/lib"); - libraryPath.Add("/usr/lib"); - - // prefix with LD_LIBRARY_PATH - var ld_library_path = SafeGetEnvironmentVariable("LD_LIBRARY_PATH"); - if (ld_library_path != null) - foreach (var i in ld_library_path.Split(Path.PathSeparator).Reverse()) - libraryPath.Insert(0, i); - } - - if (RuntimeUtil.IsOSX) - { - var home = SafeGetEnvironmentVariable("HOME"); - if (home != null) - libraryPath.Add(Path.Combine(home, "Library/Java/Extensions")); - - libraryPath.Add("/Library/Java/Extensions"); - libraryPath.Add("/Network/Library/Java/Extensions"); - libraryPath.Add("/System/Library/Java/Extensions"); - libraryPath.Add("/usr/lib/java"); - - // prefix with JAVA_LIBRARY_PATH - var javaLibraryPath = SafeGetEnvironmentVariable("JAVA_LIBRARY_PATH"); - if (javaLibraryPath != null) - foreach (var i in javaLibraryPath.Split(Path.PathSeparator)) - libraryPath.Add(i); - - // prefix with DYLD_LIBRARY_PATH - var dyldLibraryPath = SafeGetEnvironmentVariable("DYLD_LIBRARY_PATH"); - if (dyldLibraryPath != null) - foreach (var i in dyldLibraryPath.Split(Path.PathSeparator)) - libraryPath.Add(i); - - if (home != null) - libraryPath.Add(home); - - libraryPath.Add("."); - } - - try - { - var l = new List(); - - foreach (var d in GetIkvmPropertiesSearchPaths()) - { - l.Add(d); - foreach (var rid in RuntimeUtil.SupportedRuntimeIdentifiers) - l.Add(Path.Combine(d, "runtimes", rid, "native")); - } - - libraryPath.InsertRange(0, l); - } - catch (Exception) - { - // ignore - } - - if (RuntimeUtil.IsWindows) - libraryPath.Add("."); - - return string.Join(Path.PathSeparator.ToString(), libraryPath.Distinct()); + var libraryPath = new List(); + + if (RuntimeUtil.IsWindows) + { + // see /hotspot/src/os/windows/vm/os_windows.cpp for the comment that describes how we build the path + var windir = SafeGetEnvironmentVariable("SystemRoot"); + if (windir != null) + libraryPath.Add(Path.Combine(windir, "Sun", "Java", "bin")); + + try + { + libraryPath.Add(Environment.SystemDirectory); + } + catch (SecurityException) + { + + } + + if (windir != null) + libraryPath.Add(windir); + + var path = SafeGetEnvironmentVariable("PATH"); + if (path != null) + foreach (var i in path.Split(Path.PathSeparator)) + libraryPath.Add(i); + } + + if (RuntimeUtil.IsLinux) + { + // on Linux we have some hardcoded paths (from /hotspot/src/os/linux/vm/os_linux.cpp) + // and we can only guess the cpu arch based on bitness (that means only x86 and x64) + libraryPath.Add(Path.Combine("/usr/java/packages/lib/", IntPtr.Size == 4 ? "i386" : "amd64")); + libraryPath.Add("/lib"); + libraryPath.Add("/usr/lib"); + + // prefix with LD_LIBRARY_PATH + var ld_library_path = SafeGetEnvironmentVariable("LD_LIBRARY_PATH"); + if (ld_library_path != null) + foreach (var i in ld_library_path.Split(Path.PathSeparator).Reverse()) + libraryPath.Insert(0, i); + } + + if (RuntimeUtil.IsOSX) + { + var home = SafeGetEnvironmentVariable("HOME"); + if (home != null) + libraryPath.Add(Path.Combine(home, "Library/Java/Extensions")); + + libraryPath.Add("/Library/Java/Extensions"); + libraryPath.Add("/Network/Library/Java/Extensions"); + libraryPath.Add("/System/Library/Java/Extensions"); + libraryPath.Add("/usr/lib/java"); + + // prefix with JAVA_LIBRARY_PATH + var javaLibraryPath = SafeGetEnvironmentVariable("JAVA_LIBRARY_PATH"); + if (javaLibraryPath != null) + foreach (var i in javaLibraryPath.Split(Path.PathSeparator)) + libraryPath.Add(i); + + // prefix with DYLD_LIBRARY_PATH + var dyldLibraryPath = SafeGetEnvironmentVariable("DYLD_LIBRARY_PATH"); + if (dyldLibraryPath != null) + foreach (var i in dyldLibraryPath.Split(Path.PathSeparator)) + libraryPath.Add(i); + + if (home != null) + libraryPath.Add(home); + + libraryPath.Add("."); + } + + try + { + var l = new List(); + + foreach (var d in GetIkvmPropertiesSearchPaths()) + { + l.Add(d); + foreach (var rid in RuntimeUtil.SupportedRuntimeIdentifiers) + l.Add(Path.Combine(d, "runtimes", rid, "native")); + } + + libraryPath.InsertRange(0, l); + } + catch (Exception) + { + // ignore + } + + if (RuntimeUtil.IsWindows) + libraryPath.Add("."); + + return string.Join(Path.PathSeparator.ToString(), libraryPath.Distinct()); #endif - } - - /// - /// Gets the boot library paths. - /// - /// - static IEnumerable GetBootLibraryPathsIter() - { - yield return Path.Combine(HomePath, "bin"); - } - - /// - /// Gets the boot library paths - /// - /// - static string GetBootLibraryPath() - { - return string.Join(Path.PathSeparator.ToString(), GetBootLibraryPathsIter()); - } - - } - - } + } + + /// + /// Gets the boot library paths. + /// + /// + static IEnumerable GetBootLibraryPathsIter() + { + yield return Path.Combine(HomePath, "bin"); + } + + /// + /// Gets the boot library paths + /// + /// + static string GetBootLibraryPath() + { + return string.Join(Path.PathSeparator.ToString(), GetBootLibraryPathsIter()); + } + + } + + } }