Doc improvement.

git-svn-id: https://svn.kenai.com/svn/winsw~subversion/trunk@15 c8b2a3fe-9b5b-6a51-a37e-dc31b0e308fa
remotes/git-svn
kohsuke 2008-11-17 01:20:40 +00:00
parent afab25eba5
commit 8b650f865e
1 changed files with 16 additions and 4 deletions

20
Main.cs
View File

@ -22,8 +22,15 @@ namespace winsw
/// <summary> /// <summary>
/// Where did we find the configuration file? /// Where did we find the configuration file?
///
/// This string is "c:\abc\def\ghi" when the configuration XML is "c:\abc\def\ghi.xml"
/// </summary> /// </summary>
public readonly string BasePath; public readonly string BasePath;
/// <summary>
/// The file name portion of the configuration file.
///
/// In the above example, this would be "ghi".
/// </summary>
public readonly string BaseName; public readonly string BaseName;
public static string ExecutablePath public static string ExecutablePath
@ -136,6 +143,10 @@ namespace winsw
} }
} }
/// <summary>
/// Combines the contents of all the elements of the given name,
/// or return null if no element exists.
/// </summary>
private string AppendTags(string tagName) private string AppendTags(string tagName)
{ {
XmlNode argumentNode = dom.SelectSingleNode("//" + tagName); XmlNode argumentNode = dom.SelectSingleNode("//" + tagName);
@ -165,14 +176,15 @@ namespace winsw
get get
{ {
XmlNode loggingNode = dom.SelectSingleNode("//logpath"); XmlNode loggingNode = dom.SelectSingleNode("//logpath");
string logDirectory = Path.GetDirectoryName(ExecutablePath);
if (loggingNode != null) if (loggingNode != null)
{ {
logDirectory = loggingNode.InnerText; return loggingNode.InnerText;
}
else
{
return Path.GetDirectoryName(ExecutablePath);
} }
return logDirectory;
} }
} }