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

DomCR / ACadSharp / 29143042407

11 Jul 2026 06:34AM UTC coverage: 2.912% (-73.0%) from 75.918%
29143042407

push

github

web-flow
Merge pull request #1146 from ilCosmico/acds-read-payload-anchor

Read the AcDs payload area offset from the data segment header

264 of 12999 branches covered (2.03%)

Branch coverage included in aggregate %.

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

31243 existing lines in 465 files now uncovered.

1337 of 41984 relevant lines covered (3.18%)

5.38 hits per line

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

0.0
/src/ACadSharp/Objects/AnnotScaleObjectContextData.cs
1
using System;
2

3
using ACadSharp.Attributes;
4

5
namespace ACadSharp.Objects;
6

7
[DxfSubClass(null, true)]
8
public abstract class AnnotScaleObjectContextData : ObjectContextData
9
{
10
        //TODO: solve conflict with MultiLeaderObjectContextData
11
        //[DxfCodeValue(DxfReferenceType.Handle, 340)]
12
        public Scale Scale
13
        {
14
                get { return _scale; }
×
15
                set
16
                {
×
17
                        if (value == null)
×
18
                        {
×
19
                                throw new ArgumentNullException(nameof(value));
×
20
                        }
21

22
                        if (this.Document != null)
×
23
                        {
×
24
                                this._scale = CadObject.updateCollection(value, this.Document.Scales);
×
25
                        }
×
26
                        else
27
                        {
×
28
                                this._scale = value;
×
29
                        }
×
30
                }
×
31
        }
32

33
        /// <inheritdoc/>
34
        public override string SubclassMarker => DxfSubclassMarker.AnnotScaleObjectContextData;
×
35

UNCOV
36
        private Scale _scale = Scale.Default;
×
37

38
        /// <inheritdoc/>
39
        public override CadObject Clone()
UNCOV
40
        {
×
UNCOV
41
                AnnotScaleObjectContextData clone = (AnnotScaleObjectContextData)base.Clone();
×
42

UNCOV
43
                clone._scale = (Scale)this._scale?.Clone();
×
44

UNCOV
45
                return clone;
×
UNCOV
46
        }
×
47

48
        internal override void AssignDocument(CadDocument doc)
UNCOV
49
        {
×
UNCOV
50
                base.AssignDocument(doc);
×
51

UNCOV
52
                this._scale = CadObject.updateCollection(this._scale, this.Document?.Scales);
×
53

UNCOV
54
                this.Document.Scales.OnRemove += tableOnRemove;
×
UNCOV
55
        }
×
56

57
        internal override void UnassignDocument()
UNCOV
58
        {
×
UNCOV
59
                this.Document.Scales.OnRemove -= tableOnRemove;
×
60

UNCOV
61
                base.UnassignDocument();
×
62

UNCOV
63
                this._scale = (Scale)this._scale.Clone();
×
UNCOV
64
        }
×
65

66
        private void tableOnRemove(object sender, CollectionChangedEventArgs e)
67
        {
×
68
                if (e.Item.Equals(this._scale))
×
69
                {
×
70
                        this._scale = this.Document.Scales[Scale.Default.Name];
×
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