new documentation changes

This commit is contained in:
2025-12-14 15:36:34 +00:00
parent 1694747bf7
commit 9fb87079a3
13 changed files with 103 additions and 11 deletions
@@ -1,10 +1,21 @@
using System.Collections.Generic;
using NetFlow.DocumentationHelper.Library.Attributes;
using OmegaLeo.HelperLib.Game.Models;
namespace OmegaLeo.HelperLib.Game.Extensions
{
public static class ListExtensions
{
[Documentation(nameof(Shuffle),
"Shuffles the elements of the list in place using the provided RandomNumberGenerator.",
null,
@"```csharp
var list = new List<int> { 1, 2, 3, 4};
var rng = new RandomNumberGenerator();
// List before: [1, 2, 3, 4]
list.Shuffle(rng);
// List after: [3, 1, 4, 2] (example output)
```")]
public static void Shuffle<T>(this IList<T> list, RandomNumberGenerator rng)
{
for (int i = list.Count - 1; i > 0; i--)