Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
XAttributeValuePropertyDescriptor.cs
Go to the documentation of this file.
1
using
System
;
2
using
System.Xml.Linq
;
3
4
namespace
MS.Internal.Xml.Linq.ComponentModel
;
5
6
internal
sealed
class
XAttributeValuePropertyDescriptor
:
XPropertyDescriptor
<XAttribute, string>
7
{
8
private
XAttribute
_attribute
;
9
10
public
override
bool
IsReadOnly
=>
false
;
11
12
public
XAttributeValuePropertyDescriptor
()
13
: base(
"Value"
)
14
{
15
}
16
17
public
override
object
GetValue
(
object
component)
18
{
19
_attribute
= component as
XAttribute
;
20
if
(
_attribute
==
null
)
21
{
22
return
string
.Empty;
23
}
24
return
_attribute
.
Value
;
25
}
26
27
public
override
void
SetValue
(
object
component,
object
value
)
28
{
29
_attribute
= component as
XAttribute
;
30
if
(
_attribute
!=
null
)
31
{
32
_attribute.Value =
value
as
string
;
33
}
34
}
35
36
protected
override
void
OnChanged
(
object
sender,
XObjectChangeEventArgs
args)
37
{
38
if
(
_attribute
!=
null
&& args.
ObjectChange
==
XObjectChange
.Value)
39
{
40
OnValueChanged(
_attribute
,
EventArgs
.
Empty
);
41
}
42
}
43
}
MS.Internal.Xml.Linq.ComponentModel.XAttributeValuePropertyDescriptor.SetValue
override void SetValue(object component, object value)
Definition
XAttributeValuePropertyDescriptor.cs:27
MS.Internal.Xml.Linq.ComponentModel.XAttributeValuePropertyDescriptor._attribute
XAttribute _attribute
Definition
XAttributeValuePropertyDescriptor.cs:8
MS.Internal.Xml.Linq.ComponentModel.XAttributeValuePropertyDescriptor.IsReadOnly
override bool IsReadOnly
Definition
XAttributeValuePropertyDescriptor.cs:10
MS.Internal.Xml.Linq.ComponentModel.XAttributeValuePropertyDescriptor.GetValue
override object GetValue(object component)
Definition
XAttributeValuePropertyDescriptor.cs:17
MS.Internal.Xml.Linq.ComponentModel.XAttributeValuePropertyDescriptor.XAttributeValuePropertyDescriptor
XAttributeValuePropertyDescriptor()
Definition
XAttributeValuePropertyDescriptor.cs:12
MS.Internal.Xml.Linq.ComponentModel.XAttributeValuePropertyDescriptor.OnChanged
override void OnChanged(object sender, XObjectChangeEventArgs args)
Definition
XAttributeValuePropertyDescriptor.cs:36
MS.Internal.Xml.Linq.ComponentModel.XAttributeValuePropertyDescriptor
Definition
XAttributeValuePropertyDescriptor.cs:7
MS.Internal.Xml.Linq.ComponentModel.XPropertyDescriptor
Definition
XPropertyDescriptor.cs:8
System.EventArgs.Empty
static readonly EventArgs Empty
Definition
EventArgs.cs:9
System.EventArgs
Definition
EventArgs.cs:8
System.Xml.Linq.XAttribute.Value
string Value
Definition
XAttribute.cs:71
System.Xml.Linq.XAttribute
Definition
XAttribute.cs:11
System.Xml.Linq.XObjectChangeEventArgs.ObjectChange
XObjectChange ObjectChange
Definition
XObjectChangeEventArgs.cs:15
System.Xml.Linq.XObjectChangeEventArgs
Definition
XObjectChangeEventArgs.cs:4
string
MS.Internal.Xml.Linq.ComponentModel
Definition
XAttributeValuePropertyDescriptor.cs:4
System.Xml.Linq.XObjectChange
XObjectChange
Definition
XObjectChange.cs:4
System.Xml.Linq
Definition
BaseUriAnnotation.cs:1
System.ExceptionArgument.value
@ value
System
Definition
BlockingCollection.cs:8
source
System.ComponentModel.TypeConverter
MS.Internal.Xml.Linq.ComponentModel
XAttributeValuePropertyDescriptor.cs
Generated by
1.10.0