private static Map initVars() { Map vars = new Map(Sys.StrType, Sys.StrType); try { vars.caseInsensitive(true); // predefined vars.set("os.name", Environment.OSVersion.Platform.ToString()); vars.set("os.version", Environment.OSVersion.Version.ToString()); // environment variables IDictionary getenv = Environment.GetEnvironmentVariables(); foreach (DictionaryEntry de in getenv) { string key = (string)de.Key; string val = (string)de.Value; vars.set(key, val); } } catch (Exception e) { Err.dumpStack(e); } return((Map)vars.toImmutable()); }
////////////////////////////////////////////////////////////////////////// // Lazy Load ////////////////////////////////////////////////////////////////////////// internal static Map emptyParams() { Map q = m_emptyQuery; if (q == null) { q = new Map(Sys.StrType, Sys.StrType); q.caseInsensitive(true); q = (Map)q.toImmutable(); m_emptyQuery = q; } return(q); }
private static Map initVars() { Map vars = new Map(Sys.StrType, Sys.StrType); try { vars.caseInsensitive(true); // predefined vars.set("os.name", Environment.OSVersion.Platform.ToString()); vars.set("os.version", Environment.OSVersion.Version.ToString()); // environment variables IDictionary getenv = Environment.GetEnvironmentVariables(); foreach (DictionaryEntry de in getenv) { string key = (string)de.Key; string val = (string)de.Value; vars.set(key, val); } } catch (Exception e) { Err.dumpStack(e); } return (Map)vars.toImmutable(); }
////////////////////////////////////////////////////////////////////////// // Lazy Load ////////////////////////////////////////////////////////////////////////// internal static Map emptyParams() { Map q = m_emptyQuery; if (q == null) { q = new Map(Sys.StrType, Sys.StrType); q.caseInsensitive(true); q = (Map)q.toImmutable(); m_emptyQuery = q; } return q; }