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

DomCR / ACadSharp / 17737836230

15 Sep 2025 03:12PM UTC coverage: 2.092% (-76.2%) from 78.245%
17737836230

push

github

web-flow
Merge pull request #790 from DomCR/addflag-refactor

addflag refactor

141 of 9225 branches covered (1.53%)

Branch coverage included in aggregate %.

0 of 93 new or added lines in 10 files covered. (0.0%)

24910 existing lines in 372 files now uncovered.

724 of 32119 relevant lines covered (2.25%)

5.76 hits per line

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

0.0
/src/ACadSharp/Objects/SortEntitiesTable.Sorter.cs
1
using ACadSharp.Attributes;
2
using ACadSharp.Entities;
3

4
namespace ACadSharp.Objects
5
{
6
        public partial class SortEntitiesTable
7
        {
8
                /// <summary>
9
                /// Entity sorter based in their position in the collection.
10
                /// </summary>
11
                public class Sorter : System.IComparable<Sorter>
12
                {
13
                        /// <summary>
14
                        /// Sorter handle, if this doesn't point to an entity, the value will match with <see cref="Entity"/>'s handle.
15
                        /// </summary>
16
                        [DxfCodeValue(5)]
UNCOV
17
                        public ulong SortHandle { get; set; }
×
18

19
                        /// <summary>
20
                        /// Entity to set the order to.
21
                        /// </summary>
22
                        [DxfCodeValue(331)]
UNCOV
23
                        public Entity Entity { get; set; }
×
24

25
                        /// <summary>
26
                        /// Sorter constructor with the entity and handle.
27
                        /// </summary>
28
                        /// <param name="entity">Entity in the block to be sorted.</param>
29
                        /// <param name="handle">Sorter handle.</param>
UNCOV
30
                        public Sorter(Entity entity, ulong handle)
×
UNCOV
31
                        {
×
UNCOV
32
                                this.Entity = entity;
×
UNCOV
33
                                this.SortHandle = handle;
×
UNCOV
34
                        }
×
35

36
                        /// <inheritdoc/>
37
                        public override string ToString()
38
                        {
×
39
                                return $"{this.SortHandle} | {this.Entity?.ToString()}";
×
40
                        }
×
41

42
                        /// <inheritdoc/>
43
                        public int CompareTo(Sorter other)
UNCOV
44
                        {
×
UNCOV
45
                                if (this.SortHandle < other.SortHandle)
×
UNCOV
46
                                {
×
UNCOV
47
                                        return -1;
×
48
                                }
UNCOV
49
                                else if (this.SortHandle > other.SortHandle)
×
UNCOV
50
                                {
×
UNCOV
51
                                        return 1;
×
52
                                }
53
                                else
54
                                {
×
55
                                        return 0;
×
56
                                }
UNCOV
57
                        }
×
58
                }
59
        }
60
}
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