using System;
namespace Umbraco.Core
{
public static class IntExtensions
{
///
/// Does something 'x' amount of times
///
///
///
public static void Times(this int n, Action action)
{
for (int i = 0; i < n; i++)
{
action(i);
}
}
///
/// Creates a Guid based on an integer value
///
/// value to convert
///
public static Guid ToGuid(this int value)
{
byte[] bytes = new byte[16];
BitConverter.GetBytes(value).CopyTo(bytes, 0);
return new Guid(bytes);
}
}
}