System.Xml.Schema.NfaContentValidator.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;
            BitSet curpos = context.CurPos[context.CurrentState.CurPosIndex];
            for (int pos = curpos.NextSet(-1); pos != -1; pos = curpos.NextSet(pos)) {
                if (names == null) {
                    names = new ArrayList();
                }
                XmlSchemaParticle p = (XmlSchemaParticle)positions[pos].particle;
                if (p == null) {
                    string s = symbols.NameOf(positions[pos].symbol);
                    if (s.Length != 0) {
                        names.Add(s);
                    }
                }
                else {
                    string s = p.NameString;
                    if (!names.Contains(s)) {
                        names.Add(s);
                    }
                }
            }
            return names;
        }