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

Aldaviva / Unfucked / 23378203323

21 Mar 2026 10:59AM UTC coverage: 35.442% (-11.7%) from 47.183%
23378203323

push

github

Aldaviva
Seal all possible classes for allegedly higher performance, since they weren't actually subclassable anyway due to C# not making methods virtual by default. If this change does more harm than good, blame Stephen Toub.

573 of 1629 branches covered (35.17%)

14 of 72 new or added lines in 15 files covered. (19.44%)

488 existing lines in 30 files now uncovered.

975 of 2751 relevant lines covered (35.44%)

162.06 hits per line

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

0.0
/HTTP/Config/PropertyKey.cs
1
using System.Text.Json;
2
using Unfucked.HTTP.Exceptions;
3

4
namespace Unfucked.HTTP.Config;
5

UNCOV
6
public class PropertyKey(string id) {
×
7

UNCOV
8
    private static readonly string NAMESPACE = typeof(UnfuckedHttpClient).Namespace!;
×
9

10
    #region Well-known properties
11

12
    /// <summary>
13
    /// Specify custom options for serializing and deserializing HTTP request and response bodies to and from JSON using <c>System.Text.Json</c>. By default, this uses the <see cref="JsonSerializerDefaults.Web"/> options and tolerates comments.
14
    /// </summary>
UNCOV
15
    public static PropertyKey<JsonSerializerOptions> JsonSerializerOptions { get; } = new($"{NAMESPACE}.{nameof(JsonSerializerOptions)}");
×
16

17
    /// <summary>
18
    /// Whether an HTTP response status code greater than 299 should throw a <see cref="WebApplicationException"/> (<c>true</c>, default), or proceed with handling the response body and treat the response as successful (<c>false</c>).
19
    /// </summary>
UNCOV
20
    public static PropertyKey<bool> ThrowOnUnsuccessfulStatusCode { get; } = new($"{NAMESPACE}.{nameof(ThrowOnUnsuccessfulStatusCode)}");
×
21

22
    #endregion
23

UNCOV
24
    private readonly string id = id;
×
25

26
    protected bool Equals(PropertyKey other) => id == other.id;
×
27
    public override bool Equals(object? obj) => ReferenceEquals(this, obj) || (obj is PropertyKey other && Equals(other));
×
28

UNCOV
29
    public override int GetHashCode() => id.GetHashCode();
×
30

31
}
32

33
// ReSharper disable once UnusedTypeParameter - it's used for parameter constraints in Configurable
UNCOV
34
public sealed class PropertyKey<T>(string id): PropertyKey(id);
×
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