mirror of https://github.com/winsw/winsw
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-dc31b0e308faremotes/git-svn
parent
88107b7cd4
commit
9d5c22007f
20
Main.cs
20
Main.cs
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue