Exemplo n.º 1
0
        internal string GetToolSetting(string toolName, string settingName, string defaultValue, ExpansionHandler expander)
        {
            string setting = null;

            Hashtable toolSettings = (Hashtable) Tools[toolName];
            if (toolSettings != null) {
                setting = (string) toolSettings[settingName];
                if (setting != null) {
                    // expand macros
                    return expander(setting);
                }
            }

            if (setting == null && defaultValue != null) {
                return expander(defaultValue);
            }

            return setting;
        }
Exemplo n.º 2
0
        public override Hashtable GetToolArguments(string toolName, VcArgumentMap argMap, VcArgumentMap.ArgGroup ignoreGroup)
        {
            ExpansionHandler expander = new ExpansionHandler(ExpandMacros);

            Hashtable args;
            if (_parentConfig != null) {
                args = _parentConfig.GetToolArguments(toolName, argMap, ignoreGroup, expander);
            } else {
                args = CollectionsUtil.CreateCaseInsensitiveHashtable();
            }

            Hashtable toolSettings = (Hashtable) Tools[toolName];
            if (toolSettings != null) {
                foreach (DictionaryEntry de in toolSettings) {
                    string arg = argMap.GetArgument((string) de.Key, ExpandMacros((string) de.Value), ignoreGroup);
                    if (arg != null) {
                        args[(string) de.Key] = arg;
                    }
                }
            }
            return args;
        }
Exemplo n.º 3
0
 internal string GetToolSetting(string toolName, string settingName, ExpansionHandler expander)
 {
     return GetToolSetting(toolName, settingName, (string) null, expander);
 }
Exemplo n.º 4
0
        internal Hashtable GetToolArguments(string toolName, VcArgumentMap argMap, VcArgumentMap.ArgGroup ignoreGroup, ExpansionHandler expander)
        {
            Hashtable args = CollectionsUtil.CreateCaseInsensitiveHashtable();

            Hashtable toolSettings = (Hashtable) Tools[toolName];
            if (toolSettings != null) {
                foreach (DictionaryEntry de in toolSettings) {
                    string arg = argMap.GetArgument((string) de.Key, expander((string) de.Value), ignoreGroup);
                    if (arg != null) {
                        args[(string) de.Key] = arg;
                    }
                }
            }
            return args;
        }
 internal string GetToolSetting(string toolName, string settingName, ExpansionHandler expander)
 {
     return(GetToolSetting(toolName, settingName, (string)null, expander));
 }
        internal Hashtable GetToolArguments(string toolName, VcArgumentMap argMap, VcArgumentMap.ArgGroup ignoreGroup, ExpansionHandler expander)
        {
            Hashtable args = CollectionsUtil.CreateCaseInsensitiveHashtable();

            Hashtable toolSettings = (Hashtable)Tools[toolName];

            if (toolSettings != null)
            {
                foreach (DictionaryEntry de in toolSettings)
                {
                    string arg = argMap.GetArgument((string)de.Key, expander((string)de.Value), ignoreGroup);
                    if (arg != null)
                    {
                        args[(string)de.Key] = arg;
                    }
                }
            }
            return(args);
        }
        internal string GetToolSetting(string toolName, string settingName, string defaultValue, ExpansionHandler expander)
        {
            string setting = null;

            Hashtable toolSettings = (Hashtable)Tools[toolName];

            if (toolSettings != null)
            {
                setting = (string)toolSettings[settingName];
                if (setting != null)
                {
                    // expand macros
                    return(expander(setting));
                }
            }

            if (setting == null && defaultValue != null)
            {
                return(expander(defaultValue));
            }

            return(setting);
        }