public override void GetExpectedParticles(ArrayList al) { // if not started, then just collect all items from seq. if (currentAutomata == null) { foreach (XmlSchemaParticle p in seq.CompiledItems) { al.Add(p); if (!p.ValidateIsEmptiable()) { break; } } return; } // automata for ongoing iteration if (currentAutomata != null) { currentAutomata.GetExpectedParticles(al); if (!currentAutomata.EvaluateIsEmptiable()) { return; } // remaining items after currentAutomata for (int i = current + 1; i < seq.CompiledItems.Count; i++) { XmlSchemaParticle p = seq.CompiledItems [i] as XmlSchemaParticle; al.Add(p); if (!p.ValidateIsEmptiable()) { break; } } } // itself if (Occured + 1 == seq.ValidatedMaxOccurs) { return; } { for (int i = 0; i <= current; i++) { al.Add(seq.CompiledItems [i]); } } }
// Methods public override void GetExpectedParticles(ArrayList al) { head.GetExpectedParticles(al); rest.GetExpectedParticles(al); }