public static void AcceptVisitor <TResult> ( this ModuleDefinition moduleDefinition, MetadataVisitor <TResult> visitor) { if (!visitor.ShouldTraverseInto(visitor.VisitModuleDefinition(moduleDefinition))) { return; } if (moduleDefinition.HasCustomAttributes) { moduleDefinition.CustomAttributes.AcceptVisitor(visitor); } foreach (var type in moduleDefinition.Types) { type.AcceptVisitor(visitor); } }