Example #1
0
 public FixedMapImpl(MapImpl source)
 {
     _map = new MapImpl();
     foreach (KeyAndValueImpl KV in source)
     {
         _map.Insert(KV.Key, KV.Value);
     }
 }
Example #2
0
        public IRuntimeContextInstance EnvironmentVariables()
        {
            var varsMap = new MapImpl();
            var allVars = System.Environment.GetEnvironmentVariables();

            foreach (DictionaryEntry item in allVars)
            {
                varsMap.Insert(
                    ValueFactory.Create((string)item.Key),
                    ValueFactory.Create((string)item.Value));
            }

            return(varsMap);
        }
Example #3
0
        public MapImpl EnvironmentVariables()
        {
            SystemLogger.Write("WARNING! Deprecated method: 'SystemInfo.EnvironmentVariables' is deprecated, use 'EnvironmentVariables' from global context");
            var varsMap = new MapImpl();
            var allVars = System.Environment.GetEnvironmentVariables();

            foreach (DictionaryEntry item in allVars)
            {
                varsMap.Insert(
                    ValueFactory.Create((string)item.Key),
                    ValueFactory.Create((string)item.Value));
            }

            return(varsMap);
        }
Example #4
0
        public MapImpl EnvironmentVariables(EnvironmentVariableTargetEnum target = EnvironmentVariableTargetEnum.Process)
        {
            EnvironmentVariableTarget targetParam = GetSystemEnvVariableTarget(target);
            var varsMap = new MapImpl();
            var allVars = System.Environment.GetEnvironmentVariables(targetParam);

            foreach (DictionaryEntry item in allVars)
            {
                varsMap.Insert(
                    ValueFactory.Create((string)item.Key),
                    ValueFactory.Create((string)item.Value));
            }

            return(varsMap);
        }