• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In
Build has been canceled!

loresoft / MediatR.CommandQuery / 13442064295

20 Feb 2025 06:23PM UTC coverage: 59.525% (-1.4%) from 60.884%
13442064295

push

github

pwelter34
add extension methods

384 of 755 branches covered (50.86%)

Branch coverage included in aggregate %.

0 of 32 new or added lines in 3 files covered. (0.0%)

1269 of 2022 relevant lines covered (62.76%)

19.68 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/MediatR.CommandQuery/Extensions/RandomExtensions.cs
1
namespace MediatR.CommandQuery.Extensions;
2

3
/// <summary>
4
/// <see cref="Random"/> type extension methods
5
/// </summary>
6
public static class RandomExtensions
7
{
8
    private const string _chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
9

10
    /// <summary>
11
    /// Generated random alphanumeric string with the specified length.
12
    /// </summary>
13
    /// <param name="random">The random instance to use.</param>
14
    /// <param name="length">The length of the alphanumeric string to generate.</param>
15
    /// <returns>A random alphanumeric string with the specified length.</returns>
16
    public static string Alphanumeric(this Random random, int length)
17
    {
NEW
18
        Span<char> result = stackalloc char[length];
×
NEW
19
        for (int i = 0; i < length; i++)
×
NEW
20
            result[i] = _chars[random.Next(_chars.Length)];
×
21

NEW
22
        return new string(result);
×
23
    }
24
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc