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

loresoft / EntityFrameworkCore.Generator / 8398430952

23 Mar 2024 01:28AM UTC coverage: 54.745% (-0.6%) from 55.352%
8398430952

push

github

pwelter34
Fix parent child relation renames, fix sqlite relation renames

555 of 1101 branches covered (50.41%)

Branch coverage included in aggregate %.

5 of 28 new or added lines in 3 files covered. (17.86%)

1562 of 2766 relevant lines covered (56.47%)

70.97 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
    {
NEW
9
        return values.ToDelimitedString(",");
×
10
    }
11

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

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

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

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

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

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

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

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

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

NEW
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