private static void HandleTopLevelElement(XmlReader reader, IPluginVisitor visitor) { if (reader.Name == "revisions" && visitor.EnterRevisions()) { ReadRevisions(reader.ReadSubtree(), visitor); visitor.LeaveRevisions(); } else { HandleElement(reader, visitor); } }
// Fixes up the version numbers on revisions private void DumpRevisions(IPluginVisitor visitor) { if (visitor.EnterRevisions()) { // Dump ALL the revisions! int version = versionBase; foreach (var pair in revisions) { pair.Value.Version = version; version++; visitor.VisitRevision(pair.Value); } versionBase = version; visitor.LeaveRevisions(); } }
private static void HandleTopLevelElement(XmlReader reader, IPluginVisitor visitor) { if (reader.Name == "revisions") { if (visitor.EnterRevisions()) { ReadRevisions(reader.ReadSubtree(), visitor); visitor.LeaveRevisions(); } else { reader.Skip(); } } else { HandleElement(reader, visitor); } }