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

◆ AddIdentityConstraints()

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

Definition at line 805 of file XsdValidator.cs.

806 {
807 context.Constr = new ConstraintStruct[context.ElementDecl.Constraints.Length];
808 int num = 0;
809 for (int i = 0; i < context.ElementDecl.Constraints.Length; i++)
810 {
811 context.Constr[num++] = new ConstraintStruct(context.ElementDecl.Constraints[i]);
812 }
813 for (int j = 0; j < context.Constr.Length; j++)
814 {
815 if (context.Constr[j].constraint.Role != CompiledIdentityConstraint.ConstraintRole.Keyref)
816 {
817 continue;
818 }
819 bool flag = false;
821 {
822 if (((ValidationState)_validationStack[num2]).Constr != null)
823 {
824 ConstraintStruct[] constr = ((ValidationState)_validationStack[num2]).Constr;
825 for (int k = 0; k < constr.Length; k++)
826 {
827 if (constr[k].constraint.name == context.Constr[j].constraint.refer)
828 {
829 flag = true;
830 if (constr[k].keyrefTable == null)
831 {
832 constr[k].keyrefTable = new Hashtable();
833 }
834 context.Constr[j].qualifiedTable = constr[k].keyrefTable;
835 break;
836 }
837 }
838 if (flag)
839 {
840 break;
841 }
842 }
843 }
844 if (!flag)
845 {
847 }
848 }
849 if (_startIDConstraint == -1)
850 {
852 }
853 }
static string Sch_RefNotInScope
Definition SR.cs:718
Definition SR.cs:7
void SendValidationEvent(string code)
CompiledIdentityConstraint constraint
CompiledIdentityConstraint[] Constraints

References System.Xml.Schema.XsdValidator._startIDConstraint, System.Xml.Schema.XsdValidator._validationStack, System.Xml.Schema.ValidationState.Constr, System.Xml.Schema.ConstraintStruct.constraint, System.Xml.Schema.SchemaElementDecl.Constraints, System.Xml.Schema.BaseValidator.context, 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.BaseValidator.SendValidationEvent().

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