Dominik P avatar Dominik P committed d9c8d2f

Made the unique id code nicer

Comments (0)

Files changed (1)

 
 diff -r f50b41656da1 src/Appender/Rolling/CronRollingCondition.cs
 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
-+++ b/src/Appender/Rolling/CronRollingCondition.cs	Sat Sep 24 06:11:43 2011 +0200
-@@ -0,0 +1,222 @@
++++ b/src/Appender/Rolling/CronRollingCondition.cs	Sat Sep 24 06:15:21 2011 +0200
+@@ -0,0 +1,226 @@
 +#region Apache License
 +//
 +// Licensed to the Apache Software Foundation (ASF) under one or more 
 +			return IsMet(DateTime.Now);
 +		}
 +
-+		private static uint GetUniqueIndex(DateTime now)
++		private static ulong GetUniqueIndex(DateTime now)
 +		{
-+			uint result = (uint)now.DayOfWeek;
++			ulong result = (ulong)now.DayOfWeek;
 +			result <<= 3;
-+			result += (uint)now.Month;
++			result += (ulong)now.Month;
 +			result <<= 4;
-+			result += (uint)now.Day;
++			result += (ulong)now.Day;
 +			result <<= 5;
-+			result += (uint)now.Hour;
++			result += (ulong)now.Hour;
 +			result <<= 5;
-+			result += (uint)now.Minute;
++			result += (ulong)now.Minute;
 +			return result;
 +		}
 +
 +		#endregion
 +
-+		#region Private Methods
++		#region Public Methods
 +
 +		public bool IsMet(DateTime now)
 +		{
 +			return true;
 +		}
 +
++		#endregion
++
++		#region Private Methods
++
 +		private bool IsMet(Tuple<int?, MatchType> match, int item)
 +		{
 +			switch (match.Item2)
 +}
 diff -r f50b41656da1 src/Appender/Rolling/IRollingCondition.cs
 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
-+++ b/src/Appender/Rolling/IRollingCondition.cs	Sat Sep 24 06:11:43 2011 +0200
++++ b/src/Appender/Rolling/IRollingCondition.cs	Sat Sep 24 06:15:21 2011 +0200
 @@ -0,0 +1,38 @@
 +#region Apache License
 +//
 +}
 diff -r f50b41656da1 src/Appender/Rolling/IRollingStrategy.cs
 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
-+++ b/src/Appender/Rolling/IRollingStrategy.cs	Sat Sep 24 06:11:43 2011 +0200
++++ b/src/Appender/Rolling/IRollingStrategy.cs	Sat Sep 24 06:15:21 2011 +0200
 @@ -0,0 +1,32 @@
 +#region Apache License
 +//
 +}
 diff -r f50b41656da1 src/Appender/Rolling/IndexRollingStrategy.cs
 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
-+++ b/src/Appender/Rolling/IndexRollingStrategy.cs	Sat Sep 24 06:11:43 2011 +0200
++++ b/src/Appender/Rolling/IndexRollingStrategy.cs	Sat Sep 24 06:15:21 2011 +0200
 @@ -0,0 +1,77 @@
 +#region Apache License
 +//
 +}
 diff -r f50b41656da1 src/Appender/RollingFileAppenderNG.cs
 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
-+++ b/src/Appender/RollingFileAppenderNG.cs	Sat Sep 24 06:11:43 2011 +0200
++++ b/src/Appender/RollingFileAppenderNG.cs	Sat Sep 24 06:15:21 2011 +0200
 @@ -0,0 +1,143 @@
 +#region Apache License
 +//
 +}
 diff -r f50b41656da1 src/log4net.vs2010.csproj
 --- a/src/log4net.vs2010.csproj	Fri Sep 23 14:54:29 2011 +0000
-+++ b/src/log4net.vs2010.csproj	Sat Sep 24 06:11:43 2011 +0200
++++ b/src/log4net.vs2010.csproj	Sat Sep 24 06:15:21 2011 +0200
 @@ -187,6 +187,11 @@
      <Compile Include="Appender\RollingFileAppender.cs">
        <SubType>Code</SubType>
 +</Project>
 diff -r f50b41656da1 tests/src/Appender/Rolling/CronRollingConditionTest.cs
 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
-+++ b/tests/src/Appender/Rolling/CronRollingConditionTest.cs	Sat Sep 24 06:11:43 2011 +0200
++++ b/tests/src/Appender/Rolling/CronRollingConditionTest.cs	Sat Sep 24 06:15:21 2011 +0200
 @@ -0,0 +1,45 @@
 +using System;
 +using System.Collections.Generic;
 +}
 diff -r f50b41656da1 tests/src/Appender/Rolling/IndexRollingStrategyTest.cs
 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
-+++ b/tests/src/Appender/Rolling/IndexRollingStrategyTest.cs	Sat Sep 24 06:11:43 2011 +0200
++++ b/tests/src/Appender/Rolling/IndexRollingStrategyTest.cs	Sat Sep 24 06:15:21 2011 +0200
 @@ -0,0 +1,83 @@
 +using System;
 +using System.Collections.Generic;
 +}
 diff -r f50b41656da1 tests/src/log4net.Tests.vs2010.csproj
 --- a/tests/src/log4net.Tests.vs2010.csproj	Fri Sep 23 14:54:29 2011 +0000
-+++ b/tests/src/log4net.Tests.vs2010.csproj	Sat Sep 24 06:11:43 2011 +0200
++++ b/tests/src/log4net.Tests.vs2010.csproj	Sat Sep 24 06:15:21 2011 +0200
 @@ -140,6 +140,8 @@
      <Compile Include="Appender\AdoNet\Log4NetParameter.cs" />
      <Compile Include="Appender\AdoNet\Log4NetParameterCollection.cs" />
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.