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

◆ Add()

void System.Xml.Schema.SchemaInfo.Add ( SchemaInfo sinfo,
ValidationEventHandler eventhandler )
inlinepackage

Definition at line 287 of file SchemaInfo.cs.

288 {
289 if (_schemaType == SchemaType.None)
290 {
291 _schemaType = sinfo.SchemaType;
292 }
293 else if (_schemaType != sinfo.SchemaType)
294 {
295 eventhandler?.Invoke(this, new ValidationEventArgs(new XmlSchemaException(System.SR.Sch_MixSchemaTypes, string.Empty)));
296 return;
297 }
298 foreach (string key in sinfo.TargetNamespaces.Keys)
299 {
301 {
303 }
304 }
306 {
308 {
310 }
311 }
312 foreach (KeyValuePair<XmlQualifiedName, SchemaElementDecl> item in sinfo._elementDeclsByType)
313 {
315 {
316 _elementDeclsByType.Add(item.Key, item.Value);
317 }
318 }
319 foreach (SchemaAttDef value in sinfo.AttributeDecls.Values)
320 {
322 {
324 }
325 }
326 foreach (SchemaNotation value2 in sinfo.Notations.Values)
327 {
328 if (!Notations.ContainsKey(value2.Name.Name))
329 {
330 Notations.Add(value2.Name.Name, value2);
331 }
332 }
333 }
void Add(TKey key, TValue value)
static string Sch_MixSchemaTypes
Definition SR.cs:1122
Definition SR.cs:7
readonly Dictionary< XmlQualifiedName, SchemaAttDef > _attributeDecls
Definition SchemaInfo.cs:25
readonly Dictionary< XmlQualifiedName, SchemaElementDecl > _elementDecls
Definition SchemaInfo.cs:7
readonly Dictionary< string, bool > _targetNamespaces
Definition SchemaInfo.cs:23
Dictionary< string, SchemaNotation > Notations
readonly Dictionary< XmlQualifiedName, SchemaElementDecl > _elementDeclsByType
Definition SchemaInfo.cs:31

References System.Xml.Schema.SchemaInfo._attributeDecls, System.Xml.Schema.SchemaInfo._elementDecls, System.Xml.Schema.SchemaInfo._elementDeclsByType, System.Xml.Schema.SchemaInfo._schemaType, System.Xml.Schema.SchemaInfo._targetNamespaces, System.Collections.Generic.Dictionary< TKey, TValue >.Add(), System.Collections.Generic.Dictionary< TKey, TValue >.ContainsKey(), System.item, System.key, System.Collections.Generic.Dictionary< TKey, TValue >.Keys, System.Xml.Schema.SchemaInfo.Notations, System.SR.Sch_MixSchemaTypes, System.value, and System.Collections.Generic.Dictionary< TKey, TValue >.Values.

Referenced by System.Xml.Schema.XmlSchemaSet.Compile(), System.Xml.Schema.XdrBuilder.LoadSchema(), and System.Xml.Schema.XdrValidator.ProcessInlineSchema().