nicko 2005/02/13 19:09:50
Modified: src/Appender FileAppender.cs SmtpPickupDirAppender.cs
Log:
Moved ConvertToFullPath method to SystemInfo
Revision Changes Path
1.12 +5 -14 logging-log4net/src/Appender/FileAppender.cs
Index: FileAppender.cs
===================================================================
RCS file: /home/cvs/logging-log4net/src/Appender/FileAppender.cs,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- FileAppender.cs 4 Feb 2005 02:41:39 -0000 1.11
+++ FileAppender.cs 14 Feb 2005 03:09:50 -0000 1.12
@@ -387,10 +387,12 @@
/// <summary>
/// Sets the quiet writer being used.
/// </summary>
+ /// <param name="writer">the writer to set</param>
/// <remarks>
+ /// <para>
/// This method can be overridden by sub classes.
+ /// </para>
/// </remarks>
- /// <param name="writer">the writer to set</param>
virtual protected void SetQWForFiles(TextWriter writer)
{
QuietWriter = new QuietTextWriter(writer, ErrorHandler);
@@ -404,6 +406,7 @@
/// Convert a path into a fully qualified path.
/// </summary>
/// <param name="path">The path to convert.</param>
+ /// <returns>The fully qualified path.</returns>
/// <remarks>
/// <para>
/// Converts the path specified to a fully
@@ -412,21 +415,9 @@
/// directory.
/// </para>
/// </remarks>
- /// <returns>The fully qualified path.</returns>
protected static string ConvertToFullPath(string path)
{
- if (path == null)
- {
- throw new ArgumentNullException("path");
- }
-
- string applicationBaseDirectory =
SystemInfo.ApplicationBaseDirectory;
- if (applicationBaseDirectory != null)
- {
- // Note that Path.Combine will return the
second path if it is rooted
- return
Path.GetFullPath(Path.Combine(applicationBaseDirectory, path));
- }
- return Path.GetFullPath(path);
+ return SystemInfo.ConvertToFullPath(path);
}
#endregion Protected Static Methods
1.7 +2 -12 logging-log4net/src/Appender/SmtpPickupDirAppender.cs
Index: SmtpPickupDirAppender.cs
===================================================================
RCS file: /home/cvs/logging-log4net/src/Appender/SmtpPickupDirAppender.cs,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- SmtpPickupDirAppender.cs 17 Jan 2005 20:18:42 -0000 1.6
+++ SmtpPickupDirAppender.cs 14 Feb 2005 03:09:50 -0000 1.7
@@ -283,6 +283,7 @@
/// Convert a path into a fully qualified path.
/// </summary>
/// <param name="path">The path to convert.</param>
+ /// <returns>The fully qualified path.</returns>
/// <remarks>
/// <para>
/// Converts the path specified to a fully
@@ -291,20 +292,9 @@
/// directory.
/// </para>
/// </remarks>
- /// <returns>The fully qualified path.</returns>
protected static string ConvertToFullPath(string path)
{
- if (path == null)
- {
- throw new ArgumentNullException("path");
- }
-
- if (SystemInfo.ApplicationBaseDirectory != null)
- {
- // Note that Path.Combine will return the
second path if it is rooted
- return
Path.GetFullPath(Path.Combine(SystemInfo.ApplicationBaseDirectory, path));
- }
- return Path.GetFullPath(path);
+ return SystemInfo.ConvertToFullPath(path);
}
#endregion Protected Static Methods