Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
XmlElementAttribute.cs
Go to the documentation of this file.
1
using
System.Diagnostics.CodeAnalysis
;
2
using
System.Xml.Schema
;
3
4
namespace
System.Xml.Serialization
;
5
6
[
AttributeUsage
(
AttributeTargets
.Property |
AttributeTargets
.Field |
AttributeTargets
.Parameter |
AttributeTargets
.ReturnValue, AllowMultiple =
true
)]
7
public
class
XmlElementAttribute
:
Attribute
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
21
private
XmlSchemaForm
_form
;
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
}
47
[
param
:
AllowNull
]
48
set
49
{
50
_elementName
=
value
;
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
}
76
[
param
:
AllowNull
]
77
set
78
{
79
_dataType
=
value
;
80
}
81
}
82
83
public
bool
IsNullable
84
{
85
get
86
{
87
return
_nullable
;
88
}
89
set
90
{
91
_nullable
=
value
;
92
_nullableSpecified
=
true
;
93
}
94
}
95
96
internal
bool
IsNullableSpecified
=>
_nullableSpecified
;
97
98
public
XmlSchemaForm
Form
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
{
120
throw
new
ArgumentException
(
System
.
SR
.
XmlDisallowNegativeValues
,
"Order"
);
121
}
122
_order
=
value
;
123
}
124
}
125
126
public
XmlElementAttribute
()
127
{
128
}
129
130
public
XmlElementAttribute
(
string
? elementName)
131
{
132
_elementName
= elementName;
133
}
134
135
public
XmlElementAttribute
(
Type
?
type
)
136
{
137
_type
=
type
;
138
}
139
140
public
XmlElementAttribute
(
string
? elementName,
Type
?
type
)
141
{
142
_elementName
= elementName;
143
_type
=
type
;
144
}
145
146
internal
bool
GetIsNullableSpecified
()
147
{
148
return
IsNullableSpecified
;
149
}
150
}
System.Attribute
Definition
Attribute.cs:12
System.SR.XmlDisallowNegativeValues
static string XmlDisallowNegativeValues
Definition
SR.cs:1804
System.SR
Definition
SR.cs:7
System.Type
Definition
Type.cs:14
System.Xml.Serialization.XmlElementAttribute._ns
string _ns
Definition
XmlElementAttribute.cs:13
System.Xml.Serialization.XmlElementAttribute._type
Type _type
Definition
XmlElementAttribute.cs:11
System.Xml.Serialization.XmlElementAttribute._nullableSpecified
bool _nullableSpecified
Definition
XmlElementAttribute.cs:19
System.Xml.Serialization.XmlElementAttribute._form
XmlSchemaForm _form
Definition
XmlElementAttribute.cs:21
System.Xml.Serialization.XmlElementAttribute._dataType
string _dataType
Definition
XmlElementAttribute.cs:15
System.Xml.Serialization.XmlElementAttribute._elementName
string _elementName
Definition
XmlElementAttribute.cs:9
System.Xml.Serialization.XmlElementAttribute.XmlElementAttribute
XmlElementAttribute(string? elementName)
Definition
XmlElementAttribute.cs:130
System.Xml.Serialization.XmlElementAttribute.XmlElementAttribute
XmlElementAttribute(string? elementName, Type? type)
Definition
XmlElementAttribute.cs:140
System.Xml.Serialization.XmlElementAttribute.DataType
string DataType
Definition
XmlElementAttribute.cs:67
System.Xml.Serialization.XmlElementAttribute.GetIsNullableSpecified
bool GetIsNullableSpecified()
Definition
XmlElementAttribute.cs:146
System.Xml.Serialization.XmlElementAttribute.XmlElementAttribute
XmlElementAttribute(Type? type)
Definition
XmlElementAttribute.cs:135
System.Xml.Serialization.XmlElementAttribute.ElementName
string ElementName
Definition
XmlElementAttribute.cs:38
System.Xml.Serialization.XmlElementAttribute.Form
XmlSchemaForm Form
Definition
XmlElementAttribute.cs:99
System.Xml.Serialization.XmlElementAttribute.Namespace
string? Namespace
Definition
XmlElementAttribute.cs:55
System.Xml.Serialization.XmlElementAttribute.XmlElementAttribute
XmlElementAttribute()
Definition
XmlElementAttribute.cs:126
System.Xml.Serialization.XmlElementAttribute.Order
int Order
Definition
XmlElementAttribute.cs:111
System.Xml.Serialization.XmlElementAttribute._nullable
bool _nullable
Definition
XmlElementAttribute.cs:17
System.Xml.Serialization.XmlElementAttribute._order
int _order
Definition
XmlElementAttribute.cs:23
System.Xml.Serialization.XmlElementAttribute.IsNullableSpecified
bool IsNullableSpecified
Definition
XmlElementAttribute.cs:96
System.Xml.Serialization.XmlElementAttribute.IsNullable
bool IsNullable
Definition
XmlElementAttribute.cs:84
System.Xml.Serialization.XmlElementAttribute
Definition
XmlElementAttribute.cs:8
System.Diagnostics.CodeAnalysis
Definition
AllowNullAttribute.cs:1
System.Xml.Schema.XmlSchemaForm
XmlSchemaForm
Definition
XmlSchemaForm.cs:6
System.Xml.Schema
Definition
Extensions.cs:3
System.Xml.Serialization
Definition
DateTimeSerializationSection.cs:1
System.Xml.ExceptionType.ArgumentException
@ ArgumentException
System.Xml.ValueHandleType.Dictionary
@ Dictionary
System.ExceptionArgument.value
@ value
System.ExceptionArgument.type
@ type
System.AttributeTargets
AttributeTargets
Definition
AttributeTargets.cs:5
System
Definition
BlockingCollection.cs:8
source
System.Private.Xml
System.Xml.Serialization
XmlElementAttribute.cs
Generated by
1.10.0