Skip to content

Commit fda19eb

Browse files
committed
Add example C# user-defined types.
1 parent d566863 commit fda19eb

File tree

1 file changed

+55
-13
lines changed

1 file changed

+55
-13
lines changed

examples/cs.xml

Lines changed: 55 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,27 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<GraphicalDebugging>
33

4+
<Point Id="System.Windows.Point">
5+
<Coordinates>
6+
<X>_x</X>
7+
<Y>_y</Y>
8+
</Coordinates>
9+
</Point>
10+
11+
<Point Id="System.Drawing.Point">
12+
<Coordinates>
13+
<X>x</X>
14+
<Y>y</Y>
15+
</Coordinates>
16+
</Point>
17+
18+
<Point Id="System.Drawing.PointF">
19+
<Coordinates>
20+
<X>x</X>
21+
<Y>y</Y>
22+
</Coordinates>
23+
</Point>
24+
425
<!--
526
namespace WpfApp1
627
{
@@ -48,20 +69,41 @@
4869
</Container>
4970
</Points>
5071
</Linestring>
51-
5272

53-
<Point Id="System.Windows.Point">
54-
<Coordinates>
55-
<X>_x</X>
56-
<Y>_y</Y>
57-
</Coordinates>
58-
</Point>
73+
<!--
74+
namespace WpfApp1
75+
{
76+
class MyRing
77+
{
78+
List<MyPoint> points;
79+
}
80+
}
81+
-->
82+
<Ring Id="WpfApp1.MyRing">
83+
<Points>
84+
<Container>
85+
<Name>points</Name>
86+
</Container>
87+
</Points>
88+
</Ring>
5989

60-
<Point Id="System.Drawing.Point">
61-
<Coordinates>
62-
<X>x</X>
63-
<Y>y</Y>
64-
</Coordinates>
65-
</Point>
90+
<!--
91+
struct MyPolygon
92+
{
93+
MyRing outer;
94+
List<MyRing> inners;
95+
};
96+
-->
97+
<Polygon Id="WpfApp1.MyPolygon">
98+
<ExteriorRing>
99+
<Name>outer</Name>
100+
</ExteriorRing>
101+
<InteriorRings>
102+
<Container>
103+
<Name>inners</Name>
104+
</Container>
105+
<!--Offset>0</Offset-->
106+
</InteriorRings>
107+
</Polygon>
66108

67109
</GraphicalDebugging>

0 commit comments

Comments
 (0)