Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
XmlElementAttribute.cs
Go to the documentation of this file.
3
5
6[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.ReturnValue, AllowMultiple = true)]
8{
9 private string _elementName;
10
11 private Type _type;
12
13 private string _ns;
14
15 private string _dataType;
16
17 private bool _nullable;
18
19 private bool _nullableSpecified;
20
22
23 private int _order = -1;
24
25 public Type? Type
26 {
27 get
28 {
29 return _type;
30 }
31 set
32 {
33 _type = value;
34 }
35 }
36
37 public string ElementName
38 {
39 get
40 {
41 if (_elementName != null)
42 {
43 return _elementName;
44 }
45 return string.Empty;
46 }
48 set
49 {
51 }
52 }
53
54 public string? Namespace
55 {
56 get
57 {
58 return _ns;
59 }
60 set
61 {
62 _ns = value;
63 }
64 }
65
66 public string DataType
67 {
68 get
69 {
70 if (_dataType != null)
71 {
72 return _dataType;
73 }
74 return string.Empty;
75 }
77 set
78 {
80 }
81 }
82
83 public bool IsNullable
84 {
85 get
86 {
87 return _nullable;
88 }
89 set
90 {
92 _nullableSpecified = true;
93 }
94 }
95
97
99 {
100 get
101 {
102 return _form;
103 }
104 set
105 {
106 _form = value;
107 }
108 }
109
110 public int Order
111 {
112 get
113 {
114 return _order;
115 }
116 set
117 {
118 if (value < 0)
119 {
121 }
122 _order = value;
123 }
124 }
125
127 {
128 }
129
130 public XmlElementAttribute(string? elementName)
131 {
132 _elementName = elementName;
133 }
134
136 {
137 _type = type;
138 }
139
140 public XmlElementAttribute(string? elementName, Type? type)
141 {
142 _elementName = elementName;
143 _type = type;
144 }
145
147 {
148 return IsNullableSpecified;
149 }
150}
static string XmlDisallowNegativeValues
Definition SR.cs:1804
Definition SR.cs:7
XmlElementAttribute(string? elementName, Type? type)