• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

loresoft / EntityFrameworkCore.Generator / 14749418583

30 Apr 2025 07:44AM CUT coverage: 56.772%. First build
14749418583

Pull #666

github

web-flow
Merge d89b6a9a9 into 5ddfdd103
Pull Request #666: Bump Injectio from 4.1.0 to 5.0.0

566 of 1125 branches covered (50.31%)

Branch coverage included in aggregate %.

1815 of 3069 relevant lines covered (59.14%)

83.9 hits per line

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

0.0
/src/EntityFrameworkCore.Generator.Core/Extensions/EnumerableExtensions.cs
1
using System.Text;
2

3
namespace EntityFrameworkCore.Generator.Extensions;
4

5
public static class EnumerableExtensions
6
{
7
    public static string ToDelimitedString<T>(this IEnumerable<T> values)
8
    {
9
        return values.ToDelimitedString(",");
×
10
    }
11

12
    public static string ToDelimitedString<T>(this IEnumerable<T> values, string delimiter)
13
    {
14
        if (values is null)
×
15
            return null;
×
16

17
        var sb = new StringBuilder();
×
18
        foreach (var i in values)
×
19
        {
20
            if (sb.Length > 0)
×
21
                sb.Append(delimiter ?? ",");
×
22
            sb.Append(i.ToString());
×
23
        }
24

25
        return sb.ToString();
×
26
    }
27

28
    public static string ToDelimitedString(this IEnumerable<string> values)
29
    {
30
        return values.ToDelimitedString(",");
×
31
    }
32

33
    public static string ToDelimitedString(this IEnumerable<string> values, string delimiter)
34
    {
35
        return values.ToDelimitedString(delimiter, null);
×
36
    }
37

38
    public static string ToDelimitedString(this IEnumerable<string> values, string delimiter, Func<string, string> escapeDelimiter)
39
    {
40
        if (values is null)
×
41
            return null;
×
42

43
        var sb = new StringBuilder();
×
44
        foreach (var value in values)
×
45
        {
46
            if (sb.Length > 0)
×
47
                sb.Append(delimiter);
×
48

49
            var v = escapeDelimiter != null
×
50
                ? escapeDelimiter(value ?? string.Empty)
×
51
                : value ?? string.Empty;
×
52

53
            sb.Append(v);
×
54
        }
55

56
        return sb.ToString();
×
57
    }
58
}
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

© 2025 Coveralls, Inc