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

DomCR / ACadSharp / 18679832337

21 Oct 2025 09:46AM UTC coverage: 77.883% (-0.2%) from 78.126%
18679832337

push

github

web-flow
Merge pull request #832 from DomCR/multileader-dxf

multileader dxf

6920 of 9695 branches covered (71.38%)

Branch coverage included in aggregate %.

341 of 429 new or added lines in 16 files covered. (79.49%)

77 existing lines in 8 files now uncovered.

26664 of 33426 relevant lines covered (79.77%)

110330.18 hits per line

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

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

3
using ACadSharp.Attributes;
4

5
namespace ACadSharp.Objects
6
{
7
        [DxfSubClass(DxfSubclassMarker.AnnotScaleObjectContextData)]
8
        public abstract class AnnotScaleObjectContextData : ObjectContextData
9
        {
10
                [DxfCodeValue(DxfReferenceType.Handle, 340)]
11
                public Scale Scale
12
                {
NEW
13
                        get { return _scale; }
×
14
                        set
15
                        {
×
NEW
16
                                if (value == null)
×
NEW
17
                                {
×
UNCOV
18
                                        throw new ArgumentNullException(nameof(value));
×
19
                                }
20

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

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

35
                private Scale _scale = Scale.Default;
5,611✔
36

37
                public override CadObject Clone()
38
                {
4✔
39
                        AnnotScaleObjectContextData clone = (AnnotScaleObjectContextData)base.Clone();
4✔
40

41
                        clone._scale = (Scale)this._scale?.Clone();
4!
42

43
                        return clone;
4✔
44
                }
4✔
45

46
                internal override void AssignDocument(CadDocument doc)
47
                {
5,815✔
48
                        base.AssignDocument(doc);
5,815✔
49

50
                        this._scale = CadObject.updateCollection(this._scale, this.Document?.Scales);
5,815!
51

52
                        this.Document.Scales.OnRemove += tableOnRemove;
5,815✔
53
                }
5,815✔
54

55
                internal override void UnassignDocument()
56
                {
390✔
57
                        this.Document.Scales.OnRemove -= tableOnRemove;
390✔
58

59
                        base.UnassignDocument();
390✔
60

61
                        this._scale = (Scale)this._scale.Clone();
390✔
62
                }
390✔
63

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