/// <summary> /// See <see cref="Visitor.VisitAssembly"/>. /// </summary> public override void VisitAssembly(AssemblyMembers assembly) { if (delegates.VisitAssembly != null) { delegates.VisitAssembly(assembly); } base.VisitAssembly(assembly); }
/// <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); }
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); }
/// <summary> /// Visits the entire set of members read by the <see cref="DocReader.Read(Assembly)"/>. /// </summary> public virtual void VisitAssembly(AssemblyMembers assembly) => VisitDocument(assembly);