// Copyright (c) Umbraco. // See LICENSE for more details. namespace Umbraco.Extensions; public static class IntExtensions { /// /// Does something 'x' amount of times /// /// /// public static void Times(this int n, Action action) { for (var 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) { var bytes = new byte[16]; BitConverter.GetBytes(value).CopyTo(bytes, 0); return new Guid(bytes); } }