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

◆ GetInstanceName()

string System.Data.XDRSchema.GetInstanceName ( XmlElement node)
inlinepackage

Definition at line 272 of file XDRSchema.cs.

273 {
274 string attribute;
275 if (XMLSchema.FEqualIdentity(node, "ElementType", "urn:schemas-microsoft-com:xml-data") || XMLSchema.FEqualIdentity(node, "AttributeType", "urn:schemas-microsoft-com:xml-data"))
276 {
277 attribute = node.GetAttribute("name");
278 if (attribute == null || attribute.Length == 0)
279 {
280 throw ExceptionBuilder.MissingAttribute("Element", "name");
281 }
282 }
283 else
284 {
285 attribute = node.GetAttribute("type");
286 if (attribute == null || attribute.Length == 0)
287 {
288 throw ExceptionBuilder.MissingAttribute("Element", "type");
289 }
290 }
291 return attribute;
292 }

References System.Xml.Dictionary, System.Data.XMLSchema.FEqualIdentity(), and System.Data.ExceptionBuilder.MissingAttribute().

Referenced by System.Data.XDRSchema.HandleColumn(), System.Data.XDRSchema.InstantiateSimpleTable(), and System.Data.XDRSchema.InstantiateTable().