Exemple #1
0
        public static void AcceptVisitor <TResult> (
            this MethodBody methodBody,
            MetadataVisitor <TResult> visitor)
        {
            if (!visitor.ShouldTraverseInto(visitor.VisitMethodBody(methodBody)))
            {
                return;
            }

            foreach (var instruction in methodBody.Instructions)
            {
                instruction.AcceptVisitor(visitor);
            }
        }