Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
XProcessingInstruction.cs
Go to the documentation of this file.
3
4namespace System.Xml.Linq;
5
7{
8 internal string target;
9
10 internal string data;
11
12 public string Data
13 {
14 get
15 {
16 return data;
17 }
18 set
19 {
20 if (value == null)
21 {
22 throw new ArgumentNullException("value");
23 }
25 data = value;
26 if (flag)
27 {
29 }
30 }
31 }
32
33 public override XmlNodeType NodeType => XmlNodeType.ProcessingInstruction;
34
35 public string Target
36 {
37 get
38 {
39 return target;
40 }
41 set
42 {
45 target = value;
46 if (flag)
47 {
49 }
50 }
51 }
52
53 public XProcessingInstruction(string target, string data)
54 {
55 if (data == null)
56 {
57 throw new ArgumentNullException("data");
58 }
62 }
63
65 {
66 if (other == null)
67 {
68 throw new ArgumentNullException("other");
69 }
70 target = other.target;
71 data = other.data;
72 }
73
75 {
76 target = r.Name;
77 data = r.Value;
78 r.Read();
79 }
80
81 public override void WriteTo(XmlWriter writer)
82 {
83 if (writer == null)
84 {
85 throw new ArgumentNullException("writer");
86 }
87 writer.WriteProcessingInstruction(target, data);
88 }
89
91 {
92 if (writer == null)
93 {
94 throw new ArgumentNullException("writer");
95 }
96 if (cancellationToken.IsCancellationRequested)
97 {
99 }
100 return writer.WriteProcessingInstructionAsync(target, data);
101 }
102
103 internal override XNode CloneNode()
104 {
105 return new XProcessingInstruction(this);
106 }
107
108 internal override bool DeepEquals(XNode node)
109 {
111 {
112 return data == xProcessingInstruction.data;
113 }
114 return false;
115 }
116
117 internal override int GetDeepHashCode()
118 {
119 return target.GetHashCode() ^ data.GetHashCode();
120 }
121
122 private static void ValidateName(string name)
123 {
125 if (string.Equals(name, "xml", StringComparison.OrdinalIgnoreCase))
126 {
128 }
129 }
130}
static string Argument_InvalidPIName
Definition SR.cs:24
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
Definition SR.cs:7
static Task FromCanceled(CancellationToken cancellationToken)
Definition Task.cs:3363
static readonly XObjectChangeEventArgs Name
static readonly XObjectChangeEventArgs Value
bool NotifyChanging(object sender, XObjectChangeEventArgs e)
Definition XObject.cs:428
bool NotifyChanged(object sender, XObjectChangeEventArgs e)
Definition XObject.cs:399
XProcessingInstruction(string target, string data)
override Task WriteToAsync(XmlWriter writer, CancellationToken cancellationToken)
XProcessingInstruction(XProcessingInstruction other)
override void WriteTo(XmlWriter writer)
static string VerifyNCName(string name)