Esempio n. 1
0
 public static VariableCollection Environment(IEngineEnvironmentSettings environmentSettings, VariableCollection parent, string formatString) => Environment(environmentSettings, parent, true, true, formatString);
Esempio n. 2
0
 public static VariableCollection Environment(IEngineEnvironmentSettings environmentSettings, VariableCollection parent) => Environment(environmentSettings, parent, true, true, "{0}");
Esempio n. 3
0
 public VariableCollection(VariableCollection parent)
     : this(parent, new Dictionary <string, object>())
 {
 }
Esempio n. 4
0
        public static VariableCollection Environment(IEngineEnvironmentSettings environmentSettings, VariableCollection parent, bool changeCase, bool upperCase, string formatString)
        {
            VariableCollection vc = new VariableCollection(parent);
            IReadOnlyDictionary <string, string> variables = environmentSettings.Environment.GetEnvironmentVariables();

            foreach (KeyValuePair <string, string> entry in variables)
            {
                string name = string.Format(formatString, !changeCase ? entry.Key : upperCase ? entry.Key.ToUpperInvariant() : entry.Key.ToLowerInvariant());
                vc[name] = entry.Value;
            }

            return(vc);
        }
Esempio n. 5
0
 public static VariableCollection Environment(VariableCollection parent, string formatString) => Environment(parent, true, true, formatString);
Esempio n. 6
0
 public static VariableCollection Environment(VariableCollection parent) => Environment(parent, true, true, "{0}");