System.Xml.Schema.AllElementsContentValidator.ValidateElement C# (CSharp) Méthode

ValidateElement() public méthode

public ValidateElement ( XmlQualifiedName name, ValidationState context, int &errorCode ) : object
name XmlQualifiedName
context ValidationState
errorCode int
Résultat object
        public override object ValidateElement(XmlQualifiedName name, ValidationState context, out int errorCode) {
            object lookup = elements[name];
            errorCode = 0;
            if (lookup == null) {
                context.NeedValidateChildren = false;
                return null;
            }
            int index = (int)lookup;
            if (context.AllElementsSet[index]) {
                errorCode = -2;
                return null;
            }
            if (context.CurrentState.AllElementsRequired == -1) {
                context.CurrentState.AllElementsRequired = 0;
            }
            context.AllElementsSet.Set(index);
            if (isRequired[index]) {
                context.CurrentState.AllElementsRequired++;
            }
            return particles[index];
        }