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

Sholtee / injector / 2270

06 Dec 2024 06:22AM UTC coverage: 91.153% (+0.4%) from 90.719%
2270

push

appveyor

Sholtee
seems net5.0 is not supported by AppVeyor anymore

1937 of 2125 relevant lines covered (91.15%)

4.52 hits per line

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

42.86
/SRC/Injector/Private/DotGraph/DotGraphElement.cs
1
/********************************************************************************
2
* DotGraphElement.cs                                                            *
3
*                                                                               *
4
* Author: Denes Solti                                                           *
5
********************************************************************************/
6
using System.Collections.Generic;
7
using System.Diagnostics.CodeAnalysis;
8
using System.Linq;
9

10
namespace Solti.Utils.DI.Internals
11
{
12
    /// <summary>
13
    /// Describes an abstract <a href="https://graphviz.org/">DOT graph</a> element
14
    /// </summary>
15
    internal abstract class DotGraphElement
16
    {
17
        protected DotGraphElement(string id) => Id = id;
5✔
18

19
        /// <summary>
20
        /// Attributes related to this element. Principal attributes can be found <a href="https://graphviz.org/documentation/">here</a>.
21
        /// </summary>
22
        public IDictionary<string, string> Attributes { get; } = new Dictionary<string, string>();
5✔
23

24
        public string Id { get; }
25

26
        public override string ToString() => Attributes.Count > 0
×
27
            ? $"{Id} [{string.Join(",", Attributes.Select(static attr => $"{attr.Key}={attr.Value}"))}];"
×
28
            : $"{Id};";
×
29

30
        [SuppressMessage("Globalization", "CA1307:Specify StringComparison for clarity")]
31
        public override int GetHashCode() => Id.GetHashCode();
5✔
32

33
        public override bool Equals(object obj) => obj is DotGraphElement other && other.Id == Id;
×
34
    }
35
}
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

© 2025 Coveralls, Inc