/// <summary> /// See <see cref="Visitor.VisitDocument"/>. /// </summary> public override void VisitDocument(DocumentMembers document) { if (delegates.VisitDocument != null) { delegates.VisitDocument(document); } base.VisitDocument(document); }
/// <summary> /// Visits the entire set of members read by the <see cref="DocReader.Read(string)" />. /// </summary> public override void VisitDocument(DocumentMembers document) { if (this.currentElement == null) { this.currentElement = new XElement("members"); this.Xml.Add(new XElement("doc", this.currentElement)); } base.VisitDocument(document); }
public void when_reading_document_then_visits_document() { var xmlFile = Path.ChangeExtension(assembly.Location, ".xml"); var members = DocReader.Read(xmlFile); DocumentMembers docMembers = null; members.Accept(new DelegateVisitor(new VisitorDelegates { VisitDocument = doc => docMembers = doc, })); Assert.NotNull(docMembers); }
/// <summary> /// Visits the entire set of members read by the <see cref="DocReader.Read(string)"/>. /// </summary> public virtual void VisitDocument(DocumentMembers document) => VisitContainer(document);