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

net-daemon / netdaemon / 6682362857

29 Oct 2023 08:56AM UTC coverage: 79.505% (-1.2%) from 80.706%
6682362857

push

github

web-flow
Bump Roslynator.Analyzers from 4.5.0 to 4.6.1 (#960)

Bumps [Roslynator.Analyzers](https://github.com/dotnet/roslynator) from 4.5.0 to 4.6.1.
- [Release notes](https://github.com/dotnet/roslynator/releases)
- [Changelog](https://github.com/dotnet/roslynator/blob/main/ChangeLog.md)
- [Commits](https://github.com/dotnet/roslynator/compare/v4.5.0...v4.6.1)

---
updated-dependencies:
- dependency-name: Roslynator.Analyzers
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

802 of 1143 branches covered (0.0%)

Branch coverage included in aggregate %.

2895 of 3507 relevant lines covered (82.55%)

50.4 hits per line

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

86.67
/src/HassModel/NetDeamon.HassModel/Entities/StateChange.cs
1
namespace NetDaemon.HassModel.Entities;
2

3
/// <summary>
4
/// Represents a state change event for an entity
5
/// </summary>
6
public record StateChange
×
7
{
8
    /// <summary>
9
    /// This should not be used under normal circumstances but can be used for unit testing of apps
10
    /// </summary>
11
    /// <param name="entity"></param>
12
    /// <param name="old"></param>
13
    /// <param name="new"></param>
14
    public StateChange(Entity entity, EntityState? old, EntityState? @new)
50✔
15
    {
16
        Entity = entity;
50✔
17
        New    = @new;
50✔
18
        Old    = old;
50✔
19
    }
50✔
20

21
    /// <summary>The Entity that changed</summary>
22
    public virtual Entity Entity { get; } = default!; // Somehow this is needed to avoid a warning about this field being initialized
43✔
23

24
    /// <summary>The old state of the entity</summary>
25
    public virtual EntityState? Old { get; }
56✔
26

27
    /// <summary>The new state of the entity</summary>
28
    public virtual EntityState? New { get; }
66✔
29
}
30

31
/// <summary>
32
/// Represents a state change event for a strong typed entity and state 
33
/// </summary>
34
/// <typeparam name="TEntity">The Type</typeparam>
35
/// <typeparam name="TEntityState"></typeparam>
36
public record StateChange<TEntity, TEntityState> : StateChange
×
37
    where TEntity : Entity
38
    where TEntityState : EntityState
39
{
40
    /// <summary>
41
    /// This should not be used under normal circumstances but can be used for unit testing of apps
42
    /// </summary>
43
    /// <param name="entity"></param>
44
    /// <param name="old"></param>
45
    /// <param name="new"></param>
46
    public StateChange(TEntity entity, TEntityState? old, TEntityState? @new) : base(entity, old, @new)
23✔
47
    {
48
    }
23✔
49

50
    /// <inheritdoc/>
51
    public override TEntity Entity => (TEntity)base.Entity;
11✔
52

53
    /// <inheritdoc/>
54
    public override TEntityState? New => (TEntityState?)base.New;
29✔
55

56
    /// <inheritdoc/>
57
    public override TEntityState? Old => (TEntityState?)base.Old;
25✔
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

© 2026 Coveralls, Inc