Example #1
0
        public static void AcceptVisitor <TResult> (
            this AssemblyDefinition assemblyDefinition,
            MetadataVisitor <TResult> visitor)
        {
            if (!visitor.ShouldTraverseInto(visitor.VisitAssemblyDefinition(assemblyDefinition)))
            {
                return;
            }

            if (assemblyDefinition.HasCustomAttributes)
            {
                assemblyDefinition.CustomAttributes.AcceptVisitor(visitor);
            }

            foreach (var module in assemblyDefinition.Modules)
            {
                module.AcceptVisitor(visitor);
            }
        }