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

neon-sunset / U8String / 6005208900

28 Aug 2023 09:36PM UTC coverage: 18.096% (-0.2%) from 18.326%
6005208900

push

github

neon-sunset
feat: Extend NativeU8String and restructure solution to account for increased line count, add roadmap draft

134 of 1050 branches covered (0.0%)

Branch coverage included in aggregate %.

1058 of 1058 new or added lines in 25 files covered. (100.0%)

478 of 2332 relevant lines covered (20.5%)

35305.41 hits per line

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

0.0
/src/Extensions/Http/U8StringContent.cs
1
using System.Net.Http.Headers;
2

3
namespace U8Primitives.Http;
4

5
public sealed class U8StringContent : ByteArrayContent
6
{
7
    const string DefaultMediaType = "text/plain";
8
    const string CharSetType = "utf-8";
9

10
    public U8StringContent(U8String content)
11
        : base(content._value ?? Array.Empty<byte>(), content.Offset, content.Length)
×
12
    {
13
        Headers.ContentType = new(DefaultMediaType, CharSetType);
×
14
    }
×
15

16
    public U8StringContent(U8String content, string? mediaType)
17
        : base(content._value ?? Array.Empty<byte>(), content.Offset, content.Length)
×
18
    {
19
        Headers.ContentType = new(mediaType ?? DefaultMediaType, CharSetType);
×
20
    }
×
21

22
    public U8StringContent(U8String content, MediaTypeHeaderValue mediaType)
23
        : base(content._value ?? Array.Empty<byte>(), content.Offset, content.Length)
×
24
    {
25
        Headers.ContentType = mediaType;
×
26
    }
×
27
}
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