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

DomCR / ACadSharp / 15942368495

28 Jun 2025 08:38AM UTC coverage: 75.336% (+0.007%) from 75.329%
15942368495

Pull #700

github

web-flow
Merge 063a8f436 into d7e4a6e08
Pull Request #700: issue-696 sortentities fix

5833 of 8541 branches covered (68.29%)

Branch coverage included in aggregate %.

18 of 28 new or added lines in 5 files covered. (64.29%)

4 existing lines in 2 files now uncovered.

23240 of 30050 relevant lines covered (77.34%)

82044.77 hits per line

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

69.23
/src/ACadSharp/Objects/SortEntitiesTable.cs
1
using ACadSharp.Attributes;
2
using ACadSharp.Entities;
3
using ACadSharp.Tables;
4
using System;
5
using System.Collections;
6
using System.Collections.Generic;
7

8
namespace ACadSharp.Objects
9
{
10
        /// <summary>
11
        /// Represents a <see cref="SortEntitiesTable"/> object
12
        /// </summary>
13
        /// <remarks>
14
        /// Object name <see cref="DxfFileToken.ObjectSortEntsTable"/> <br/>
15
        /// Dxf class name <see cref="DxfSubclassMarker.SortentsTable"/>
16
        /// </remarks>
17
        [DxfName(DxfFileToken.ObjectSortEntsTable)]
18
        [DxfSubClass(DxfSubclassMarker.SortentsTable)]
19
        public partial class SortEntitiesTable : NonGraphicalObject, IEnumerable<SortEntitiesTable.Sorter>
20
        {
21
                /// <summary>
22
                /// Dictionary entry name for the object <see cref="SortEntitiesTable"/>
23
                /// </summary>
24
                public const string DictionaryEntryName = "ACAD_SORTENTS";
25

26
                /// <inheritdoc/>
27
                public override ObjectType ObjectType => ObjectType.UNLISTED;
×
28

29
                /// <inheritdoc/>
30
                public override string ObjectName => DxfFileToken.ObjectSortEntsTable;
1,053✔
31

32
                /// <inheritdoc/>
33
                public override string SubclassMarker => DxfSubclassMarker.SortentsTable;
×
34

35
                /// <summary>
36
                /// Block owner where the table is applied
37
                /// </summary>
38
                [DxfCodeValue(330)]
39
                public BlockRecord BlockOwner { get; internal set; }
1,080✔
40

41
                private List<Sorter> _sorters = new();
1,051✔
42

43
                internal SortEntitiesTable()
1,051✔
44
                {
1,051✔
45
                        this.Name = DictionaryEntryName;
1,051✔
46
                }
1,051✔
47

48
                internal SortEntitiesTable(BlockRecord owner) : this()
2✔
49
                {
2✔
50
                        this.BlockOwner = owner;
2✔
51
                }
2✔
52

53
                /// <summary>
54
                /// Sorter attached to an entity.
55
                /// </summary>
56
                /// <param name="entity">Entity in the block to be sorted.</param>
57
                /// <param name="sorterHandle">Sorter handle.</param>
58
                /// <exception cref="ArgumentException"></exception>
59
                public void Add(Entity entity, ulong sorterHandle)
60
                {
2,811✔
61
                        this._sorters.Add(new Sorter(entity, sorterHandle));
2,811✔
62
                }
2,811✔
63

64
                /// <summary>
65
                /// Removes all elements in the collection.
66
                /// </summary>
67
                public void Clear()
NEW
68
                {
×
NEW
69
                        this._sorters.Clear();
×
NEW
70
                }
×
71

72
                /// <inheritdoc/>
73
                public IEnumerator<Sorter> GetEnumerator()
74
                {
32✔
75
                        this._sorters.Sort();
32✔
76
                        return this._sorters.GetEnumerator();
32✔
77
                }
32✔
78

79
                /// <inheritdoc/>
80
                IEnumerator IEnumerable.GetEnumerator()
81
                {
×
NEW
82
                        return this.GetEnumerator();
×
83
                }
×
84
        }
85
}
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