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

◆ ValidateIdAttribute()

void System.Xml.Schema.Preprocessor.ValidateIdAttribute ( XmlSchemaObject xso)
inlineprivate

Definition at line 1865 of file Preprocessor.cs.

1866 {
1867 if (xso.IdAttribute != null)
1868 {
1869 try
1870 {
1871 xso.IdAttribute = base.NameTable.Add(XmlConvert.VerifyNCName(xso.IdAttribute));
1872 }
1873 catch (XmlException ex)
1874 {
1875 SendValidationEvent(System.SR.Sch_InvalidIdAttribute, new string[1] { ex.Message }, ex, xso);
1876 return;
1877 }
1878 catch (ArgumentNullException)
1879 {
1881 return;
1882 }
1883 try
1884 {
1885 _currentSchema.Ids.Add(xso.IdAttribute, xso);
1886 }
1887 catch (ArgumentException)
1888 {
1890 }
1891 }
1892 }
void Add(TKey key, TValue value)
virtual void Add(object key, object? value)
Definition Hashtable.cs:676
static string Sch_InvalidIdAttribute
Definition SR.cs:1136
static string Sch_NullValue
Definition SR.cs:1156
static string Sch_DupIdAttribute
Definition SR.cs:934
Definition SR.cs:7
void SendValidationEvent(string code, XmlSchemaObject source)

References System.Xml.Schema.Preprocessor._currentSchema, System.Collections.Hashtable.Add(), System.Collections.Generic.Dictionary< TKey, TValue >.Add(), System.Xml.Dictionary, System.Xml.Schema.XmlSchemaObject.IdAttribute, System.Xml.Schema.XmlSchema.Ids, System.SR.Sch_DupIdAttribute, System.SR.Sch_InvalidIdAttribute, System.SR.Sch_NullValue, System.Xml.Schema.BaseProcessor.SendValidationEvent(), and System.Xml.XmlConvert.VerifyNCName().

Referenced by System.Xml.Schema.Preprocessor.Preprocess(), System.Xml.Schema.Preprocessor.PreprocessAnnotation(), System.Xml.Schema.Preprocessor.PreprocessAttribute(), System.Xml.Schema.Preprocessor.PreprocessAttributeGroup(), System.Xml.Schema.Preprocessor.PreprocessAttributes(), System.Xml.Schema.Preprocessor.PreprocessComplexType(), System.Xml.Schema.Preprocessor.PreprocessElement(), System.Xml.Schema.Preprocessor.PreprocessGroup(), System.Xml.Schema.Preprocessor.PreprocessIdentityConstraint(), System.Xml.Schema.Preprocessor.PreprocessLocalAttribute(), System.Xml.Schema.Preprocessor.PreprocessLocalElement(), System.Xml.Schema.Preprocessor.PreprocessNotation(), System.Xml.Schema.Preprocessor.PreprocessParticle(), and System.Xml.Schema.Preprocessor.PreprocessSimpleType().