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

HicServices / RDMP / 10485573112

21 Aug 2024 07:35AM UTC coverage: 57.398% (-0.009%) from 57.407%
10485573112

push

github

web-flow
Remove trivial Equ usage (#1934)

* Remove trivial usage of Equ - one less package in dependencies

* Update CollectionNavigation.cs

Remove disused using

11187 of 20998 branches covered (53.28%)

Branch coverage included in aggregate %.

0 of 8 new or added lines in 1 file covered. (0.0%)

31658 of 53647 relevant lines covered (59.01%)

8217.46 hits per line

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

0.0
/Application/ResearchDataManagementPlatform/WindowManagement/CollectionNavigation.cs
1
// Copyright (c) The University of Dundee 2018-2019
2
// This file is part of the Research Data Management Platform (RDMP).
3
// RDMP is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
4
// RDMP is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
5
// You should have received a copy of the GNU General Public License along with RDMP. If not, see <https://www.gnu.org/licenses/>.
6

7
#nullable enable
8
using System;
9
using FAnsi.Discovery;
10
using Rdmp.Core.CommandExecution;
11
using Rdmp.Core.MapsDirectlyToDatabaseTable;
12

13
namespace ResearchDataManagementPlatform.WindowManagement;
14

15
/// <summary>
16
/// Records the fact that the user visited a specific object in a tree collection
17
/// </summary>
18
public sealed class CollectionNavigation : IEquatable<CollectionNavigation>, INavigation
19
{
20
    private readonly IMapsDirectlyToDatabaseTable _object;
21

NEW
22
    public bool IsAlive => _object is not IMightNotExist o || o.Exists();
×
23

24
    public CollectionNavigation(IMapsDirectlyToDatabaseTable @object)
×
25
    {
NEW
26
        _object = @object;
×
27
    }
×
28

29
    public void Activate(ActivateItems activateItems)
30
    {
NEW
31
        activateItems.RequestItemEmphasis(this, new EmphasiseRequest(_object, 0));
×
32
    }
×
33

34
    public void Close()
35
    {
36
    }
×
37

NEW
38
    public override string? ToString() => _object.ToString();
×
39

40
    public bool Equals(CollectionNavigation? other)
41
    {
NEW
42
        if (other is null) return false;
×
43

NEW
44
        return ReferenceEquals(this, other) || Equals(_object, other._object);
×
45
    }
46

NEW
47
    public override bool Equals(object? obj) => ReferenceEquals(this, obj) || (obj is CollectionNavigation other && Equals(other));
×
48

NEW
49
    public override int GetHashCode() => HashCode.Combine(_object);
×
50
}
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