toImmutable() public method

public toImmutable ( ) : object
return object
Ejemplo n.º 1
0
        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());
        }
Ejemplo n.º 2
0
        //////////////////////////////////////////////////////////////////////////
        // 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);
        }
Ejemplo n.º 3
0
        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();
        }
Ejemplo n.º 4
0
Archivo: MimeType.cs Proyecto: xored/f4
 //////////////////////////////////////////////////////////////////////////
 // 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;
 }