System.Xml.Schema.DfaContentValidator.ExpectedElements C# (CSharp) Method

ExpectedElements() public method

public ExpectedElements ( ValidationState context, bool isRequiredOnly ) : ArrayList
context ValidationState
isRequiredOnly bool
return System.Collections.ArrayList
        public override ArrayList ExpectedElements(ValidationState context, bool isRequiredOnly) {
            ArrayList names = null;
            int[] transition = transitionTable[context.CurrentState.State];
            if (transition != null) {
                for (int i = 0; i < transition.Length - 1; i ++) {
                    if (transition[i] != -1) {
                        if (names == null) {
                            names = new ArrayList();
                        }
                        XmlSchemaParticle p = (XmlSchemaParticle)symbols.GetParticle(i);
                        if (p == null) {
                            string s = symbols.NameOf(i);
                            if (s.Length != 0) {
                                names.Add(s);
                            }
                        }
                        else {
                            string s = p.NameString;
                            if (!names.Contains(s)) {
                                names.Add(s);
                            }
                        }
                    }
                }
            }
            return names;
        }