System.Xml.Schema.XmlSchemaValidator.AttributeIdentityConstraints C# (CSharp) 메소드

AttributeIdentityConstraints() 개인적인 메소드

private AttributeIdentityConstraints ( string name, string ns, object obj, string sobj, XmlSchemaDatatype datatype ) : void
name string
ns string
obj object
sobj string
datatype XmlSchemaDatatype
리턴 void
        private void AttributeIdentityConstraints(string name, string ns, object obj, string sobj, XmlSchemaDatatype datatype)
        {
            for (int ci = _startIDConstraint; ci < _validationStack.Length; ci++)
            {
                // no constraint for this level
                if (((ValidationState)(_validationStack[ci])).Constr == null)
                {
                    continue;
                }

                // else
                ConstraintStruct[] constraintStructures = ((ValidationState)_validationStack[ci]).Constr;
                for (int i = 0; i < constraintStructures.Length; ++i)
                {
                    // axisFields is not null, but may be empty
                    for (int j = 0; j < constraintStructures[i].axisFields.Count; ++j)
                    {
                        LocatedActiveAxis laxis = (LocatedActiveAxis)constraintStructures[i].axisFields[j];

                        // check field from here
                        if (laxis.MoveToAttribute(name, ns))
                        {
                            Debug.WriteLine("Attribute Field Match!");
                            //attribute is only simpletype, so needn't checking...
                            // can fill value here, yeah!!
                            Debug.WriteLine("Attribute Field Filling Value!");
                            Debug.WriteLine("Name: " + name + "\t|\tURI: " + ns + "\t|\tValue: " + obj + "\n");
                            if (laxis.Ks[laxis.Column] != null)
                            {
                                // should be evaluated to either an empty node-set or a node-set with exactly one member
                                // two matches...
                                SendValidationEvent(SR.Sch_FieldSingleValueExpected, name);
                            }
                            else
                            {
                                Debug.Assert(datatype != null);
                                laxis.Ks[laxis.Column] = new TypedObject(obj, sobj, datatype);
                            }
                        }
                    }
                }
            }
        }