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

mt89vein / Sstv.Outbox / 10439187609

18 Aug 2024 08:32AM UTC coverage: 66.428% (-0.7%) from 67.084%
10439187609

push

github

mt89vein
feat: outbox with autopartitioning

199 of 376 branches covered (52.93%)

Branch coverage included in aggregate %.

245 of 367 new or added lines in 18 files covered. (66.76%)

4 existing lines in 2 files now uncovered.

822 of 1161 relevant lines covered (70.8%)

69.38 hits per line

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

75.0
/src/Sstv.Outbox/Features/Status/StatusFeature.cs
1
namespace Sstv.Outbox;
2

3
/// <summary>
4
/// Processing outbox items with statuses.
5
/// </summary>
6
/// <param name="Enabled">Enabled or not.</param>
7
public sealed record StatusFeature(bool Enabled);
160✔
8

9
/// <summary>
10
/// Extensions for <see cref="OutboxOptions"/>.
11
/// </summary>
12
public static partial class OutboxOptionsExtensions
13
{
14
    private const string StatusFeature = "StatusFeature";
15

16
    /// <summary>
17
    /// Sets status feature config.
18
    /// </summary>
19
    /// <param name="options">Options.</param>
20
    /// <typeparam name="TOutboxItem">Type of outbox item.</typeparam>
21
    internal static void SetStatusFeature<TOutboxItem>(this OutboxOptions options)
22
    {
23
        ArgumentNullException.ThrowIfNull(options);
160✔
24

25
        options.Set(StatusFeature, new StatusFeature(
160✔
26
            Enabled: typeof(TOutboxItem).IsAssignableTo(typeof(IHasStatus))
160✔
27
        ));
160✔
28
    }
160✔
29

30
    /// <summary>
31
    /// Returns status feature.
32
    /// </summary>
33
    /// <param name="options">Options.</param>
34
    /// <returns>StatusFeature.</returns>
35
    public static StatusFeature GetStatusFeature(this OutboxOptions options)
36
    {
NEW
37
        ArgumentNullException.ThrowIfNull(options);
×
38

NEW
39
        return options.Get<StatusFeature>(StatusFeature);
×
40
    }
41
}
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