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

◆ ProcessAttribute()

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

Definition at line 766 of file XsdBuilder.cs.

767 {
768 XmlQualifiedName xmlQualifiedName = new XmlQualifiedName(name, ns);
769 if (_currentEntry.Attributes != null)
770 {
771 for (int i = 0; i < _currentEntry.Attributes.Length; i++)
772 {
773 XsdAttributeEntry xsdAttributeEntry = _currentEntry.Attributes[i];
775 {
776 try
777 {
778 xsdAttributeEntry.BuildFunc(this, value);
779 return;
780 }
781 catch (XmlSchemaException ex)
782 {
784 SendValidationEvent(System.SR.Sch_InvalidXsdAttributeDatatypeValue, new string[2] { name, ex.Message }, XmlSeverityType.Error);
785 return;
786 }
787 }
788 }
789 }
790 if (ns != _schemaNames.NsXs && ns.Length != 0)
791 {
792 if (ns == _schemaNames.NsXmlNs)
793 {
794 if (_namespaces == null)
795 {
797 }
798 _namespaces.Add(new XmlQualifiedName((name == _schemaNames.QnXmlNs.Name) ? string.Empty : name, value));
799 }
800 else
801 {
802 XmlAttribute xmlAttribute = new XmlAttribute(prefix, name, ns, _schema.Document);
805 }
806 }
807 else
808 {
810 }
811 }
void Add(TKey key, TValue value)
static string Sch_UnsupportedAttribute
Definition SR.cs:424
static string Sch_InvalidXsdAttributeDatatypeValue
Definition SR.cs:578
Definition SR.cs:7
XmlQualifiedName[] TokenToQName
void SendValidationEvent(string code, string arg0, string arg1, string arg2)
readonly XmlSchema _schema
readonly SchemaNames _schemaNames
List< XmlQualifiedName > _namespaces
readonly List< XmlAttribute > _unhandledAttributes
readonly XmlReader _reader
readonly PositionInfo _positionInfo
override bool Equals([NotNullWhen(true)] object? other)

References System.Xml.Schema.XsdBuilder._currentEntry, System.Xml.Schema.XsdBuilder._namespaces, System.Xml.Schema.XsdBuilder._positionInfo, System.Xml.Schema.XsdBuilder._reader, System.Xml.Schema.XsdBuilder._schema, System.Xml.Schema.XsdBuilder._schemaNames, System.Xml.Schema.XsdBuilder._unhandledAttributes, System.Collections.Generic.Dictionary< TKey, TValue >.Add(), System.Xml.Schema.XsdBuilder.XsdEntry.Attributes, System.Xml.XmlReader.BaseURI, System.Xml.Dictionary, System.Xml.Schema.XmlSchema.Document, System.Xml.XmlQualifiedName.Equals(), System.Xml.PositionInfo.LineNumber, System.Xml.PositionInfo.LinePosition, System.Xml.XmlQualifiedName.Name, System.Xml.Schema.SchemaNames.NsXmlNs, System.Xml.Schema.SchemaNames.NsXs, System.prefix, System.Xml.Schema.SchemaNames.QnXmlNs, System.SR.Sch_InvalidXsdAttributeDatatypeValue, System.SR.Sch_UnsupportedAttribute, System.Xml.Schema.XsdBuilder.SendValidationEvent(), System.Xml.Schema.SchemaNames.TokenToQName, and System.value.