Ejemplo n.º 1
0
 public static VariableCollection Environment(IEngineEnvironmentSettings environmentSettings, VariableCollection parent, string formatString) => Environment(environmentSettings, parent, true, true, formatString);
Ejemplo n.º 2
0
 public static VariableCollection Environment(IEngineEnvironmentSettings environmentSettings, VariableCollection parent) => Environment(environmentSettings, parent, true, true, "{0}");
Ejemplo n.º 3
0
 public VariableCollection(VariableCollection parent)
     : this(parent, new Dictionary <string, object>())
 {
 }
Ejemplo 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);
        }
Ejemplo n.º 5
0
 public static VariableCollection Environment(VariableCollection parent, string formatString) => Environment(parent, true, true, formatString);
Ejemplo n.º 6
0
 public static VariableCollection Environment(VariableCollection parent) => Environment(parent, true, true, "{0}");