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

DomCR / ACadSharp / 22042725382

15 Feb 2026 08:42PM UTC coverage: 77.217% (-0.2%) from 77.463%
22042725382

Pull #978

github

web-flow
Merge 3627690b4 into 4609c0caf
Pull Request #978: issue-976 context data

8154 of 11444 branches covered (71.25%)

Branch coverage included in aggregate %.

81 of 217 new or added lines in 13 files covered. (37.33%)

9 existing lines in 6 files now uncovered.

29510 of 37333 relevant lines covered (79.05%)

150816.78 hits per line

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

47.62
/src/ACadSharp/Objects/BlockReferenceObjectContextData.cs
1
using ACadSharp.Attributes;
2
using CSMath;
3
using System;
4

5
namespace ACadSharp.Objects;
6

7
/// <summary>
8
/// Represents object context data for a block reference entity, including insertion point, rotation, and scale factors
9
/// in world coordinates.
10
/// </summary>
11
/// <remarks>This type provides context-specific information for block references, such as position and
12
/// transformation parameters, which are used when applying annotation scaling or other context-dependent behaviors. It
13
/// is typically used in scenarios where block references must adapt to different annotation scales or contexts within a
14
/// drawing. All scale factor properties must be non-zero; setting a scale factor to zero will result in an
15
/// exception.</remarks>
16
[DxfName(DxfFileToken.BlkRefObjectContextData)]
17
[DxfSubClass(DxfSubclassMarker.AnnotScaleObjectContextData)]
18
public class BlockReferenceObjectContextData : AnnotScaleObjectContextData
19
{
20
        /// <summary>
21
        /// Gets or sets the insertion point of the entity in world coordinates.
22
        /// </summary>
23
        [DxfCodeValue(10, 20, 30)]
24
        public XYZ InsertionPoint { get; set; }
1✔
25

26
        /// <inheritdoc/>
NEW
27
        public override string ObjectName => DxfFileToken.BlkRefObjectContextData;
×
28

29
        /// <summary>
30
        /// Gets or sets the rotation angle of the entity, in degrees.
31
        /// </summary>
32
        [DxfCodeValue(DxfReferenceType.IsAngle, 50)]
33
        public double Rotation { get; set; }
1✔
34

35
        /// <summary>
36
        /// X scale factor.
37
        /// </summary>
38
        [DxfCodeValue(41)]
39
        public double XScale
40
        {
41
                get
NEW
42
                {
×
NEW
43
                        return this._xscale;
×
NEW
44
                }
×
45
                set
46
                {
1✔
47
                        if (value.Equals(0))
1!
NEW
48
                        {
×
NEW
49
                                string name = nameof(this.XScale);
×
NEW
50
                                throw new ArgumentOutOfRangeException(name, value, $"{name} value must be none zero.");
×
51
                        }
52
                        this._xscale = value;
1✔
53
                }
1✔
54
        }
55

56
        /// <summary>
57
        /// Y scale factor.
58
        /// </summary>
59
        [DxfCodeValue(42)]
60
        public double YScale
61
        {
62
                get
NEW
63
                {
×
NEW
64
                        return this._yscale;
×
NEW
65
                }
×
66
                set
67
                {
1✔
68
                        if (value.Equals(0))
1!
NEW
69
                        {
×
NEW
70
                                string name = nameof(this.YScale);
×
NEW
71
                                throw new ArgumentOutOfRangeException(name, value, $"{name} value must be none zero.");
×
72
                        }
73
                        this._yscale = value;
1✔
74
                }
1✔
75
        }
76

77
        /// <summary>
78
        /// Z scale factor.
79
        /// </summary>
80
        [DxfCodeValue(43)]
81
        public double ZScale
82
        {
83
                get
NEW
84
                {
×
NEW
85
                        return this._zscale;
×
NEW
86
                }
×
87
                set
88
                {
1✔
89
                        if (value.Equals(0))
1!
NEW
90
                        {
×
NEW
91
                                string name = nameof(this.ZScale);
×
NEW
92
                                throw new ArgumentOutOfRangeException(name, value, $"{name} value must be none zero.");
×
93
                        }
94
                        this._zscale = value;
1✔
95
                }
1✔
96
        }
97

98
        private double _xscale = 1;
1✔
99

100
        private double _yscale = 1;
1✔
101

102
        private double _zscale = 1;
1✔
103
}
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