Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ ParseNameTestThrow()

static void System.Xml.ValidateNames.ParseNameTestThrow ( string s,
out string prefix,
out string localName )
inlinestaticpackage

Definition at line 158 of file ValidateNames.cs.

159 {
160 int num;
161 if (s.Length != 0 && s[0] == '*')
162 {
163 prefix = (localName = null);
164 num = 1;
165 }
166 else
167 {
168 num = ParseNCName(s, 0);
169 if (num != 0)
170 {
171 localName = s.Substring(0, num);
172 if (num < s.Length && s[num] == ':')
173 {
174 prefix = localName;
175 int num2 = num + 1;
176 if (num2 < s.Length && s[num2] == '*')
177 {
178 localName = null;
179 num += 2;
180 }
181 else
182 {
183 int num3 = ParseNCName(s, num2);
184 if (num3 != 0)
185 {
186 localName = s.Substring(num2, num3);
187 num += num3 + 1;
188 }
189 }
190 }
191 else
192 {
193 prefix = string.Empty;
194 }
195 }
196 else
197 {
198 prefix = (localName = null);
199 }
200 }
201 if (num == 0 || num != s.Length)
202 {
203 ThrowInvalidName(s, 0, num);
204 }
205 }
static void ThrowInvalidName(string s, int offsetStartChar, int offsetBadChar)
static int ParseNCName(string s, int offset)

References System.Xml.Dictionary, System.Xml.ValidateNames.ParseNCName(), System.prefix, System.s, and System.Xml.ValidateNames.ThrowInvalidName().

Referenced by System.Xml.Xsl.Xslt.Compiler.ParseNameTest().