Exemple #1
0
        /// <summary>
        /// See <see cref="Visitor.VisitDocument"/>.
        /// </summary>
        public override void VisitDocument(DocumentMembers document)
        {
            if (delegates.VisitDocument != null)
            {
                delegates.VisitDocument(document);
            }

            base.VisitDocument(document);
        }
Exemple #2
0
        /// <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);
        }
Exemple #3
0
        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);
        }
Exemple #4
0
 /// <summary>
 /// Visits the entire set of members read by the <see cref="DocReader.Read(string)"/>.
 /// </summary>
 public virtual void VisitDocument(DocumentMembers document) => VisitContainer(document);