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

DomCR / ACadSharp / 13497036401

24 Feb 2025 11:32AM UTC coverage: 76.099% (+0.04%) from 76.058%
13497036401

Pull #568

github

web-flow
Merge 915fc1352 into 92500eff0
Pull Request #568: remove MSTest dependency

5457 of 7875 branches covered (69.3%)

Branch coverage included in aggregate %.

21542 of 27604 relevant lines covered (78.04%)

75897.51 hits per line

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

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

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

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

28
                /// <inheritdoc/>
29
                public override string ObjectName => DxfFileToken.ObjectSortEntsTable;
30✔
30

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

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

40
                /// <summary>
41
                /// List of the <see cref="BlockOwner"/> entities sorted.
42
                /// </summary>
43
                public IEnumerable<Sorter> Sorters { get { return this._sorters; } }
96✔
44

45
                private List<Sorter> _sorters = new();
976✔
46

47
                internal SortEntitiesTable()
976✔
48
                {
976✔
49
                        this.Name = DictionaryEntryName;
976✔
50
                }
976✔
51

52
                internal SortEntitiesTable(BlockRecord owner) : this()
1✔
53
                {
1✔
54
                        this.BlockOwner = owner;
1✔
55
                }
1✔
56

57
                /// <summary>
58
                /// Sorter attached to an entity.
59
                /// </summary>
60
                /// <param name="entity">Entity in the block to be sorted.</param>
61
                /// <param name="sorterHandle">Sorter handle, will use the entity handle if null.</param>
62
                /// <exception cref="ArgumentException"></exception>
63
                public void AddEntity(Entity entity, ulong? sorterHandle = null)
64
                {
2,600✔
65
                        this._sorters.Add(new Sorter(entity, sorterHandle));
2,600✔
66
                }
2,600✔
67

68
                internal void OnAddEntity(object sender, CollectionChangedEventArgs e)
69
                {
×
70
                        this._sorters.Add(new Sorter((Entity)e.Item));
×
71
                }
×
72
        }
73
}
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