예제 #1
0
        public static void AcceptVisitor <TResult> (
            this GenericParameter genericParameter,
            MetadataVisitor <TResult> visitor)
        {
            if (!visitor.ShouldTraverseInto(visitor.VisitGenericParameter(genericParameter)))
            {
                return;
            }

            genericParameter.GetElementType().AcceptVisitor(visitor);

            if (genericParameter.HasConstraints)
            {
                foreach (var constraintType in genericParameter.Constraints)
                {
                    constraintType.AcceptVisitor(visitor);
                }
            }
        }