Support for multiple optional <argument> elements to make it easier to uncomment single (debug) arguments. When available the argument element(s) overrule the <arguments> element.

git-svn-id: https://svn.kenai.com/svn/winsw~subversion/trunk@9 c8b2a3fe-9b5b-6a51-a37e-dc31b0e308fa
remotes/git-svn
jjasper4 2008-11-08 20:49:58 +00:00
parent 88107b7cd4
commit 9d5c22007f
1 changed files with 18 additions and 2 deletions

20
Main.cs
View File

@ -78,13 +78,29 @@ namespace winsw
}
/// <summary>
/// Arguments
/// Arguments or multiple optional argument elements which overrule the arguments element.
/// </summary>
public string Arguments
{
get
{
return SingleElement("arguments");
XmlNode argumentNode = dom.SelectSingleNode("//argument");
if (argumentNode == null)
{
return SingleElement("arguments");
}
else
{
string arguments = "";
foreach (XmlNode argument in dom.SelectNodes("//argument"))
{
arguments += " " + argument.InnerText;
}
return Environment.ExpandEnvironmentVariables(arguments);
}
}
}