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

◆ AddIdentityConstraints()

void System.Xml.Schema.XmlSchemaValidator.AddIdentityConstraints ( )
inlineprivate

Definition at line 2035 of file XmlSchemaValidator.cs.

2036 {
2037 SchemaElementDecl elementDecl = _context.ElementDecl;
2038 _context.Constr = new ConstraintStruct[elementDecl.Constraints.Length];
2039 int num = 0;
2040 for (int i = 0; i < elementDecl.Constraints.Length; i++)
2041 {
2042 _context.Constr[num++] = new ConstraintStruct(elementDecl.Constraints[i]);
2043 }
2044 for (int j = 0; j < _context.Constr.Length; j++)
2045 {
2046 if (_context.Constr[j].constraint.Role != CompiledIdentityConstraint.ConstraintRole.Keyref)
2047 {
2048 continue;
2049 }
2050 bool flag = false;
2052 {
2053 if (((ValidationState)_validationStack[num2]).Constr != null)
2054 {
2055 ConstraintStruct[] constr = ((ValidationState)_validationStack[num2]).Constr;
2056 for (int k = 0; k < constr.Length; k++)
2057 {
2058 if (constr[k].constraint.name == _context.Constr[j].constraint.refer)
2059 {
2060 flag = true;
2061 if (constr[k].keyrefTable == null)
2062 {
2063 constr[k].keyrefTable = new Hashtable();
2064 }
2065 _context.Constr[j].qualifiedTable = constr[k].keyrefTable;
2066 break;
2067 }
2068 }
2069 if (flag)
2070 {
2071 break;
2072 }
2073 }
2074 }
2075 if (!flag)
2076 {
2078 }
2079 }
2080 if (_startIDConstraint == -1)
2081 {
2083 }
2084 }
static string Sch_RefNotInScope
Definition SR.cs:718
Definition SR.cs:7
CompiledIdentityConstraint constraint
static string QNameString(string localName, string ns)

References System.Xml.Schema.XmlSchemaValidator._context, System.Xml.Schema.XmlSchemaValidator._startIDConstraint, System.Xml.Schema.XmlSchemaValidator._validationStack, System.Xml.Schema.ValidationState.Constr, System.Xml.Schema.ConstraintStruct.constraint, System.Xml.Dictionary, System.Xml.Schema.ValidationState.ElementDecl, System.Xml.HWStack.Length, System.Xml.Schema.ValidationState.LocalName, System.Xml.Schema.ValidationState.Namespace, System.Xml.Schema.XmlSchemaValidator.QNameString(), System.Xml.Schema.ConstraintStruct.qualifiedTable, System.Xml.Schema.CompiledIdentityConstraint.refer, System.Xml.Schema.CompiledIdentityConstraint.Role, System.SR.Sch_RefNotInScope, and System.Xml.Schema.XmlSchemaValidator.SendValidationEvent().

Referenced by System.Xml.Schema.XmlSchemaValidator.ValidateStartElementIdentityConstraints().