public void ScanForwardToNextTag() { while (Position < Content.Count && !Content[Position].IsTag) { if (!Content[Position].CanOutput) { DeferredAction action = Content[Position] as DeferredAction; Debug.Assert(action != null, "Internal content items should be deferred actions."); Content.RemoveAt(Position); action.Do(this); } else { ++Position; } } }