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

◆ ReplaceSchemaInfo()

void System.Xml.Schema.XNodeValidator.ReplaceSchemaInfo ( XObject o,
XmlSchemaInfo schemaInfo )
inlineprivate

Definition at line 172 of file XNodeValidator.cs.

173 {
174 if (schemaInfos == null)
175 {
176 schemaInfos = new Dictionary<XmlSchemaInfo, XmlSchemaInfo>(new XmlSchemaInfoEqualityComparer());
177 }
178 XmlSchemaInfo value = o.Annotation<XmlSchemaInfo>();
179 if (value != null)
180 {
182 {
184 }
185 o.RemoveAnnotations<XmlSchemaInfo>();
186 }
187 if (!schemaInfos.TryGetValue(schemaInfo, out value))
188 {
189 value = schemaInfo;
191 }
192 o.AddAnnotation(value);
193 }
bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
void Add(TKey key, TValue value)
Dictionary< XmlSchemaInfo, XmlSchemaInfo > schemaInfos

References System.Collections.Generic.Dictionary< TKey, TValue >.Add(), System.Collections.Generic.Dictionary< TKey, TValue >.ContainsKey(), System.Xml.Dictionary, System.Xml.Schema.XNodeValidator.schemaInfos, System.Collections.Generic.Dictionary< TKey, TValue >.TryGetValue(), and System.value.

Referenced by System.Xml.Schema.XNodeValidator.ValidateAttribute(), System.Xml.Schema.XNodeValidator.ValidateAttributes(), and System.Xml.Schema.XNodeValidator.ValidateElement().