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

◆ AddDefaultAttributeNonDtd()

bool System.Xml.XmlTextReaderImpl.AddDefaultAttributeNonDtd ( SchemaAttDef attrDef)
inlinepackage

Definition at line 8169 of file XmlTextReaderImpl.cs.

8170 {
8171 string text = _nameTable.Add(attrDef.Name.Name);
8172 string text2 = _nameTable.Add(attrDef.Prefix);
8173 string text3 = _nameTable.Add(attrDef.Name.Namespace);
8174 if (text2.Length == 0 && text3.Length > 0)
8175 {
8177 if (text2 == null)
8178 {
8179 text2 = string.Empty;
8180 }
8181 }
8182 for (int i = _index + 1; i < _index + 1 + _attrCount; i++)
8183 {
8184 if ((object)_nodes[i].localName == text && ((object)_nodes[i].prefix == text2 || ((object)_nodes[i].ns == text3 && text3 != null)))
8185 {
8186 return false;
8187 }
8188 }
8189 NodeData nodeData = AddDefaultAttributeInternal(text, text3, text2, attrDef.DefaultValueExpanded, attrDef.LineNumber, attrDef.LinePosition, attrDef.ValueLineNumber, attrDef.ValueLinePosition, attrDef.Reserved != SchemaAttDef.Reserve.None);
8190 nodeData.schemaType = ((attrDef.SchemaType == null) ? ((object)attrDef.Datatype) : ((object)attrDef.SchemaType));
8191 nodeData.typedValue = attrDef.DefaultValueTyped;
8192 return true;
8193 }
string Add(char[] array, int offset, int length)
virtual ? string LookupPrefix(string uri)
XmlNamespaceManager _namespaceManager
NodeData AddDefaultAttributeInternal(string localName, string ns, string prefix, string value, int lineNo, int linePos, int valueLineNo, int valueLinePos, bool isXmlAttribute)

References System.Xml.XmlTextReaderImpl._attrCount, System.Xml.XmlTextReaderImpl._index, System.Xml.XmlTextReaderImpl._namespaceManager, System.Xml.XmlTextReaderImpl._nameTable, System.Xml.XmlTextReaderImpl._nodes, System.Xml.XmlNameTable.Add(), System.Xml.XmlTextReaderImpl.AddDefaultAttributeInternal(), System.Xml.Dictionary, System.Xml.XmlNamespaceManager.LookupPrefix(), System.prefix, and System.text.

Referenced by System.Xml.XmlValidatingReaderImpl.AddDefaultAttribute().