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

◆ ProcessAttribute()

override void System.Xml.Schema.XdrBuilder.ProcessAttribute ( string prefix,
string name,
string ns,
string value )
inlinepackage

Definition at line 390 of file XdrBuilder.cs.

391 {
392 XmlQualifiedName xmlQualifiedName = new XmlQualifiedName(name, XmlSchemaDatatype.XdrCanonizeUri(ns, _NameTable, _SchemaNames));
393 for (int i = 0; i < _CurState._Attributes.Length; i++)
394 {
395 XdrAttributeEntry xdrAttributeEntry = _CurState._Attributes[i];
397 {
398 continue;
399 }
400 XdrBuildFunction buildFunc = xdrAttributeEntry._BuildFunc;
401 if (xdrAttributeEntry._Datatype.TokenizedType == XmlTokenizedType.QName)
402 {
403 string prefix2;
404 XmlQualifiedName xmlQualifiedName2 = XmlQualifiedName.Parse(value, _CurNsMgr, out prefix2);
406 if (prefix2.Length == 0)
407 {
408 xmlQualifiedName2 = ((!IsGlobal(xdrAttributeEntry._SchemaFlags)) ? new XmlQualifiedName(xmlQualifiedName2.Name) : new XmlQualifiedName(xmlQualifiedName2.Name, _TargetNamespace));
409 }
410 else if (xdrAttributeEntry._Attribute != SchemaNames.Token.SchemaType)
411 {
412 throw new XmlException(System.SR.Xml_UnexpectedToken, "NAME");
413 }
415 }
416 else
417 {
418 buildFunc(this, xdrAttributeEntry._Datatype.ParseValue(value, _NameTable, _CurNsMgr), string.Empty);
419 }
420 return;
421 }
422 if ((object)ns == _SchemaNames.NsXmlNs && IsXdrSchema(value))
423 {
425 }
427 {
429 }
430 }
static string Sch_UnsupportedAttribute
Definition SR.cs:424
static string Xml_UnexpectedToken
Definition SR.cs:1806
Definition SR.cs:7
XmlQualifiedName[] TokenToQName
readonly XmlNamespaceManager _CurNsMgr
readonly SchemaNames _SchemaNames
bool LoadSchema(string uri)
static bool IsXdrSchema(string uri)
bool IsSkipableAttribute(XmlQualifiedName qname)
void SendValidationEvent(string code, string[] args, XmlSeverityType severity)
readonly XmlNameTable _NameTable
override bool Equals([NotNullWhen(true)] object? other)

References System.Xml.Schema.XdrBuilder.XdrEntry._Attributes, System.Xml.Schema.XdrBuilder._CurNsMgr, System.Xml.Schema.XdrBuilder._CurState, System.Xml.Schema.XdrBuilder._NameTable, System.Xml.Schema.XdrBuilder._SchemaNames, System.Xml.Schema.XdrBuilder._TargetNamespace, System.Xml.Dictionary, System.Xml.XmlQualifiedName.Equals(), System.Xml.Schema.XdrBuilder.IsGlobal(), System.Xml.Schema.XdrBuilder.IsSkipableAttribute(), System.Xml.Schema.XdrBuilder.IsXdrSchema(), System.Xml.Schema.XdrBuilder.LoadSchema(), System.Xml.Schema.SchemaNames.NsXmlNs, System.Xml.XmlQualifiedName.Parse(), System.prefix, System.SR.Sch_UnsupportedAttribute, System.Xml.Schema.XdrBuilder.SendValidationEvent(), System.Xml.Schema.SchemaNames.TokenToQName, System.Xml.XmlQualifiedName.ToString(), System.value, System.Xml.Schema.XmlSchemaDatatype.XdrCanonizeUri(), System.SR.Xml_UnexpectedToken, and System.Xml.XmlException.