コード例 #1
0
ファイル: DelegateVisitor.cs プロジェクト: xoofx/NuDoq
        /// <summary>
        /// See <see cref="Visitor.VisitAssembly"/>.
        /// </summary>
        public override void VisitAssembly(AssemblyMembers assembly)
        {
            if (delegates.VisitAssembly != null)
            {
                delegates.VisitAssembly(assembly);
            }

            base.VisitAssembly(assembly);
        }
コード例 #2
0
ファイル: XmlVisitor.cs プロジェクト: xoofx/NuDoq
        /// <summary>
        /// Visits the entire set of members read by the <see cref="DocReader.Read(Assembly)" />.
        /// </summary>
        public override void VisitAssembly(AssemblyMembers assembly)
        {
            this.currentElement = new XElement("members");
            this.Xml.Add(new XElement("doc",
                                      new XElement("assembly",
                                                   new XElement("name", assembly.Assembly.GetName().Name)),
                                      this.currentElement));

            base.VisitAssembly(assembly);
        }
コード例 #3
0
        public void when_reading_assembly_then_visits_assembly_and_document()
        {
            var             xmlFile    = Path.ChangeExtension(assembly.Location, ".xml");
            var             members    = DocReader.Read(assembly);
            AssemblyMembers asmMembers = null;
            DocumentMembers docMembers = null;

            members.Accept(new DelegateVisitor(new VisitorDelegates
            {
                VisitAssembly = asm => asmMembers = asm,
                VisitDocument = doc => docMembers = doc,
            }));

            Assert.NotNull(asmMembers);
            Assert.NotNull(docMembers);
        }
コード例 #4
0
ファイル: Visitor.cs プロジェクト: liwq-net/NuDoq
 /// <summary>
 /// Visits the entire set of members read by the <see cref="DocReader.Read(Assembly)"/>.
 /// </summary>
 public virtual void VisitAssembly(AssemblyMembers assembly) => VisitDocument(assembly);