Files
Umbraco-CMS/src/Umbraco.Core/IntExtensions.cs
shannon@ShandemVaio b7cea05f18 Added unit test for custom log file appender, integrated a few more classes from v5 for tracing,
added initial trace logging to application startup which works. Changed the application startup handler
to use new logging, now the system won't bork if the sql db isn't initialized.
2012-07-28 23:08:02 +06:00

20 lines
365 B
C#

using System;
namespace Umbraco.Core
{
public static class IntExtensions
{
/// <summary>
/// Does something 'x' amount of times
/// </summary>
/// <param name="n"></param>
/// <param name="action"></param>
public static void Times(this int n, Action<int> action)
{
for (int i = 0; i < n; i++)
{
action(i);
}
}
}
}