You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by da...@apache.org on 2022/01/24 08:12:35 UTC
[logging-log4net] 01/02: :fire: remove dead commented code
This is an automated email from the ASF dual-hosted git repository.
davydm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/logging-log4net.git
commit acc55ec1754824e385ad2812d936ecd43407e6e2
Author: Davyd McColl <da...@gmail.com>
AuthorDate: Fri Jan 21 15:18:23 2022 +0200
:fire: remove dead commented code
---
src/log4net/Util/OptionConverter.cs | 103 ------------------------------------
1 file changed, 103 deletions(-)
diff --git a/src/log4net/Util/OptionConverter.cs b/src/log4net/Util/OptionConverter.cs
index 776bcc2..21eabfe 100644
--- a/src/log4net/Util/OptionConverter.cs
+++ b/src/log4net/Util/OptionConverter.cs
@@ -18,7 +18,6 @@
#endregion
using System;
-using System.Collections;
using System.Globalization;
using System.Reflection;
using System.Text;
@@ -58,79 +57,6 @@ namespace log4net.Util
#region Public Static Methods
-// /// <summary>
-// /// Concatenates two string arrays.
-// /// </summary>
-// /// <param name="l">Left array.</param>
-// /// <param name="r">Right array.</param>
-// /// <returns>Array containing both left and right arrays.</returns>
-// public static string[] ConcatenateArrays(string[] l, string[] r)
-// {
-// return (string[])ConcatenateArrays(l, r);
-// }
-
-// /// <summary>
-// /// Concatenates two arrays.
-// /// </summary>
-// /// <param name="l">Left array</param>
-// /// <param name="r">Right array</param>
-// /// <returns>Array containing both left and right arrays.</returns>
-// public static Array ConcatenateArrays(Array l, Array r)
-// {
-// if (l == null)
-// {
-// throw new ArgumentNullException("l");
-// }
-// if (r == null)
-// {
-// throw new ArgumentNullException("r");
-// }
-//
-// int len = l.Length + r.Length;
-// Array a = Array.CreateInstance(l.GetType(), len);
-//
-// Array.Copy(l, 0, a, 0, l.Length);
-// Array.Copy(r, 0, a, l.Length, r.Length);
-//
-// return a;
-// }
-
-// /// <summary>
-// /// Converts string escape characters back to their correct values.
-// /// </summary>
-// /// <param name="s">String to convert.</param>
-// /// <returns>Converted result.</returns>
-// public static string ConvertSpecialChars(string s)
-// {
-// if (s == null)
-// {
-// throw new ArgumentNullException("s");
-// }
-// char c;
-// int len = s.Length;
-// StringBuilder buf = new StringBuilder(len);
-//
-// int i = 0;
-// while(i < len)
-// {
-// c = s[i++];
-// if (c == '\\')
-// {
-// c = s[i++];
-// if (c == 'n') c = '\n';
-// else if (c == 'r') c = '\r';
-// else if (c == 't') c = '\t';
-// else if (c == 'f') c = '\f';
-// else if (c == '\b') c = '\b';
-// else if (c == '\"') c = '\"';
-// else if (c == '\'') c = '\'';
-// else if (c == '\\') c = '\\';
-// }
-// buf.Append(c);
-// }
-// return buf.ToString();
-// }
-
/// <summary>
/// Converts a string to a <see cref="bool" /> value.
/// </summary>
@@ -160,35 +86,6 @@ namespace log4net.Util
return defaultValue;
}
-// /// <summary>
-// /// Converts a string to an integer.
-// /// </summary>
-// /// <param name="argValue">String to convert.</param>
-// /// <param name="defaultValue">The default value.</param>
-// /// <returns>The <see cref="int" /> value of <paramref name="argValue" />.</returns>
-// /// <remarks>
-// /// <para>
-// /// <paramref name="defaultValue"/> is returned when <paramref name="argValue"/>
-// /// cannot be converted to a <see cref="int" /> value.
-// /// </para>
-// /// </remarks>
-// public static int ToInt(string argValue, int defaultValue)
-// {
-// if (argValue != null)
-// {
-// string s = argValue.Trim();
-// try
-// {
-// return int.Parse(s, NumberFormatInfo.InvariantInfo);
-// }
-// catch (Exception e)
-// {
-// LogLog.Error(declaringType, "OptionConverter: [" + s + "] is not in proper int form.", e);
-// }
-// }
-// return defaultValue;
-// }
-
/// <summary>
/// Parses a file size into a number.
/// </summary>