Commits

Dominik P committed 1b54b62

Tabify once more, vs2010 really sucks..

  • Participants
  • Parent commits aa28205

Comments (0)

Files changed (1)

 
 diff -r 5a5078efc63a src/Appender/RollingFileAppenderNG.cs
 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
-+++ b/src/Appender/RollingFileAppenderNG.cs	Wed Sep 21 22:30:16 2011 +0200
++++ b/src/Appender/RollingFileAppenderNG.cs	Wed Sep 21 22:36:54 2011 +0200
 @@ -0,0 +1,143 @@
 +#region Apache License
 +//
 +		/// </remarks>
 +		public RollingFileAppenderNG() 
 +		{
-+            // for now set up the cron rolling condition and the index rolling strategy by default
-+            RollingCondition = new CronRollingCondition("*", "*", "*", "*", "*");
-+            RollingStrategy = new IndexRollingStrategy();
++			// for now set up the cron rolling condition and the index rolling strategy by default
++			RollingCondition = new CronRollingCondition("*", "*", "*", "*", "*");
++			RollingStrategy = new IndexRollingStrategy();
 +		}
 +
 +		#endregion Public Instance Constructors
 +}
 diff -r 5a5078efc63a src/Appender/RollingFileAppenderNGAPI/CronRollingCondition.cs
 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
-+++ b/src/Appender/RollingFileAppenderNGAPI/CronRollingCondition.cs	Wed Sep 21 22:30:16 2011 +0200
++++ b/src/Appender/RollingFileAppenderNGAPI/CronRollingCondition.cs	Wed Sep 21 22:36:54 2011 +0200
 @@ -0,0 +1,177 @@
 +#region Apache License
 +//
 +	/// <author>Dominik Psenner</author>
 +	public class CronRollingCondition : IRollingCondition
 +	{
-+        #region Public Instance Constructors
++		#region Public Instance Constructors
 +
-+        public CronRollingCondition()
-+            : this("*", "*", "*", "*", "*")
-+        {
-+        }
++		public CronRollingCondition()
++			: this("*", "*", "*", "*", "*")
++		{
++		}
 +
-+        public CronRollingCondition(string dow, string month, string day, string hour, string minute)
-+        {
-+            Dow = TryParse(dow);
-+            Month = TryParse(month);
-+            Day = TryParse(day);
-+            Hour = TryParse(hour);
-+            Minute = TryParse(minute);
-+        }
++		public CronRollingCondition(string dow, string month, string day, string hour, string minute)
++		{
++			Dow = TryParse(dow);
++			Month = TryParse(month);
++			Day = TryParse(day);
++			Hour = TryParse(hour);
++			Minute = TryParse(minute);
++		}
 +
-+        #endregion
++		#endregion
 +
-+        #region Protected Instance Properties
++		#region Protected Instance Properties
 +
-+        protected Tuple<int?, MatchType> Dow { get; private set; }
-+        protected Tuple<int?, MatchType> Month { get; private set; }
-+        protected Tuple<int?, MatchType> Day { get; private set; }
-+        protected Tuple<int?, MatchType> Hour { get; private set; }
-+        protected Tuple<int?, MatchType> Minute { get; private set; }
++		protected Tuple<int?, MatchType> Dow { get; private set; }
++		protected Tuple<int?, MatchType> Month { get; private set; }
++		protected Tuple<int?, MatchType> Day { get; private set; }
++		protected Tuple<int?, MatchType> Hour { get; private set; }
++		protected Tuple<int?, MatchType> Minute { get; private set; }
 +
-+        #endregion
++		#endregion
 +
-+        #region Protected Inner Classes
++		#region Protected Inner Classes
 +
-+        protected enum MatchType
-+        {
-+            Nothing,
-+            Exact,
-+            Remainder,
-+        }
++		protected enum MatchType
++		{
++			Nothing,
++			Exact,
++			Remainder,
++		}
 +
-+        #endregion
++		#endregion
 +
-+        #region Protected Static Methods
++		#region Protected Static Methods
 +
-+        /// <summary>
-+        /// This method parses a string to match any of these:
-+        /// i
-+        /// *
-+        /// */i
-+        /// </summary>
-+        /// <param name="input"></param>
-+        /// <returns></returns>
-+        static protected Tuple<int?, MatchType> TryParse(string input)
-+        {
-+            // trim input and strip empty spaces
-+            string inputParsed = input.Trim().Replace(" ", "").Replace("\t", "");
++		/// <summary>
++		/// This method parses a string to match any of these:
++		/// i
++		/// *
++		/// */i
++		/// </summary>
++		/// <param name="input"></param>
++		/// <returns></returns>
++		static protected Tuple<int?, MatchType> TryParse(string input)
++		{
++			// trim input and strip empty spaces
++			string inputParsed = input.Trim().Replace(" ", "").Replace("\t", "");
 +
-+            // match anything: *
-+            if (inputParsed == "*")
-+            {
-+                return Tuple.Create<int?, MatchType>(null, MatchType.Nothing);
-+            }
-+            // match a remainder: */c
-+            if (inputParsed.StartsWith("*/") || inputParsed.StartsWith(@"*\"))
-+            {
-+                // strip first two chars
-+                inputParsed = inputParsed.Substring(2);
-+                // parse the remainder
-+                int i = -1;
-+                if (int.TryParse(inputParsed, out i))
-+                {
-+                    return Tuple.Create<int?, MatchType>(i, MatchType.Remainder);
-+                }
-+            }
-+            else // match one specific numer: i
-+            {
-+                int i = -1;
-+                if (int.TryParse(inputParsed, out i))
-+                {
-+                    return Tuple.Create<int?, MatchType>(i, MatchType.Exact);
-+                }
-+            }
++			// match anything: *
++			if (inputParsed == "*")
++			{
++				return Tuple.Create<int?, MatchType>(null, MatchType.Nothing);
++			}
++			// match a remainder: */c
++			if (inputParsed.StartsWith("*/") || inputParsed.StartsWith(@"*\"))
++			{
++				// strip first two chars
++				inputParsed = inputParsed.Substring(2);
++				// parse the remainder
++				int i = -1;
++				if (int.TryParse(inputParsed, out i))
++				{
++					return Tuple.Create<int?, MatchType>(i, MatchType.Remainder);
++				}
++			}
++			else // match one specific numer: i
++			{
++				int i = -1;
++				if (int.TryParse(inputParsed, out i))
++				{
++					return Tuple.Create<int?, MatchType>(i, MatchType.Exact);
++				}
++			}
 +
-+            // throw exception by default
-+            throw new FormatException(string.Format("The input string '{0}' could not be parsed to a valid format.", input));
-+        }
++			// throw exception by default
++			throw new FormatException(string.Format("The input string '{0}' could not be parsed to a valid format.", input));
++		}
 +
-+        #endregion
++		#endregion
 +
-+        #region Implementation of IRollingCondition
++		#region Implementation of IRollingCondition
 +
-+        public bool IsMet(string file)
++		public bool IsMet(string file)
 +		{
 +			DateTime now = DateTime.Now;
 +			if (!IsMet(Dow, now))
 +			return true;
 +		}
 +
-+        #endregion
++		#endregion
 +
-+        #region Private Methods
++		#region Private Methods
 +
-+        private bool IsMet(Tuple<int?, MatchType> match, DateTime now)
++		private bool IsMet(Tuple<int?, MatchType> match, DateTime now)
 +		{
 +			switch (match.Item2)
 +			{
 +					break;
 +			}
 +			return true;
-+        }
++		}
 +
-+        #endregion
-+    }
++		#endregion
++	}
 +}
 diff -r 5a5078efc63a src/Appender/RollingFileAppenderNGAPI/IRollingCondition.cs
 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
-+++ b/src/Appender/RollingFileAppenderNGAPI/IRollingCondition.cs	Wed Sep 21 22:30:16 2011 +0200
++++ b/src/Appender/RollingFileAppenderNGAPI/IRollingCondition.cs	Wed Sep 21 22:36:54 2011 +0200
 @@ -0,0 +1,38 @@
 +#region Apache License
 +//
 +}
 diff -r 5a5078efc63a src/Appender/RollingFileAppenderNGAPI/IRollingStrategy.cs
 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
-+++ b/src/Appender/RollingFileAppenderNGAPI/IRollingStrategy.cs	Wed Sep 21 22:30:16 2011 +0200
++++ b/src/Appender/RollingFileAppenderNGAPI/IRollingStrategy.cs	Wed Sep 21 22:36:54 2011 +0200
 @@ -0,0 +1,32 @@
 +#region Apache License
 +//
 +}
 diff -r 5a5078efc63a src/Appender/RollingFileAppenderNGAPI/IndexRollingStrategy.cs
 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
-+++ b/src/Appender/RollingFileAppenderNGAPI/IndexRollingStrategy.cs	Wed Sep 21 22:30:16 2011 +0200
++++ b/src/Appender/RollingFileAppenderNGAPI/IndexRollingStrategy.cs	Wed Sep 21 22:36:54 2011 +0200
 @@ -0,0 +1,77 @@
 +#region Apache License
 +//
 +	/// </summary>
 +	/// <author>Dominik Psenner</author>
 +	public class IndexRollingStrategy : IRollingStrategy
-+    {
-+        #region Implementation of IRollingStrategy
++	{
++		#region Implementation of IRollingStrategy
 +
-+        /// <summary>
-+        /// This method rolls a file with backup indexes between
-+        /// [0..10].
-+        /// </summary>
-+        /// <param name="file"></param>
-+        public void Roll(string file)
++		/// <summary>
++		/// This method rolls a file with backup indexes between
++		/// [0..10].
++		/// </summary>
++		/// <param name="file"></param>
++		public void Roll(string file)
 +		{
 +			DoRoll(file, file, 0, 10);
 +		}
 +
-+        #endregion
++		#endregion
 +
-+        #region Private Methods
++		#region Private Methods
 +
-+        private void DoRoll(string baseFilename, string currentFilename, int currentIndex, int maxIndex)
++		private void DoRoll(string baseFilename, string currentFilename, int currentIndex, int maxIndex)
 +		{
 +			if (currentIndex > maxIndex)
 +			{
-+                if (File.Exists(currentFilename))
-+                {
-+                    File.Delete(currentFilename);
-+                }
++				if (File.Exists(currentFilename))
++				{
++					File.Delete(currentFilename);
++				}
 +				return;
 +			}
 +			if (!File.Exists(currentFilename))
 +			// iterate the process until we meet the end
 +			DoRoll(baseFilename, nextFilename, currentIndex + 1, maxIndex);
 +
-+            // rename this file now that there's free room after us
-+            File.Move(currentFilename, nextFilename);
-+        }
++			// rename this file now that there's free room after us
++			File.Move(currentFilename, nextFilename);
++		}
 +
-+        #endregion
-+    }
++		#endregion
++	}
 +}
 diff -r 5a5078efc63a src/log4net.vs2010.csproj
 --- a/src/log4net.vs2010.csproj	Tue Sep 20 17:52:26 2011 +0000
-+++ b/src/log4net.vs2010.csproj	Wed Sep 21 22:30:16 2011 +0200
++++ b/src/log4net.vs2010.csproj	Wed Sep 21 22:36:54 2011 +0200
 @@ -187,6 +187,13 @@
      <Compile Include="Appender\RollingFileAppender.cs">
        <SubType>Code</SubType>