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

lucaslorentz / auto-compute / 20023238074

08 Dec 2025 09:26AM UTC coverage: 82.736% (+0.02%) from 82.72%
20023238074

push

github

lucaslorentz
Simplify code a lot by removing generic TInput

55 of 62 new or added lines in 17 files covered. (88.71%)

1778 of 2149 relevant lines covered (82.74%)

847.44 hits per line

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

50.0
/src/LLL.AutoCompute/ComputedInput.cs
1
using System.Collections.Concurrent;
2

3
namespace LLL.AutoCompute;
4

5
public sealed class ComputedInput
6
{
7
    private readonly ConcurrentDictionary<object, object?> _values = new();
2,364✔
8

9
    public IncrementalContext? IncrementalContext { get; set; }
10,834✔
10

11
    public ComputedInput Set<T>(T value)
12
    {
13
        _values[typeof(T)] = value;
4,728✔
14
        return this;
4,728✔
15
    }
16

17
    public bool TryGet<T>(out T? value)
18
    {
NEW
19
        if (!_values.TryGetValue(typeof(T), out var result))
×
20
        {
NEW
21
            value = default;
×
NEW
22
            return false;
×
23
        }
NEW
24
        value = (T)result!;
×
NEW
25
        return true;
×
26
    }
27

28
    public T Get<T>()
29
    {
30
        if (!_values.TryGetValue(typeof(T), out var result))
22,140✔
NEW
31
            throw new KeyNotFoundException($"No value of type {typeof(T)} found in ComputedInput.");
×
32

33
        return (T)result!;
22,140✔
34
    }
35
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc