public override object ValidateElement(XmlQualifiedName name, ValidationState context, out int errorCode)
{
BitSet set = context.CurPos[context.CurrentState.CurPosIndex];
int index = (context.CurrentState.CurPosIndex + 1) % 2;
BitSet set2 = context.CurPos[index];
set2.Clear();
int num2 = this.symbols[name];
object particle = null;
errorCode = 0;
for (int i = set.NextSet(-1); i != -1; i = set.NextSet(i))
{
if (num2 == this.positions[i].symbol)
{
set2.Or(this.followpos[i]);
particle = this.positions[i].particle;
break;
}
}
if (!set2.IsEmpty)
{
context.CurrentState.CurPosIndex = index;
return(particle);
}
if (!base.IsOpen || !set[this.endMarkerPos])
{
context.NeedValidateChildren = false;
errorCode = -1;
}
return(null);
}