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

            var parameters = propertyReference.Parameters;

            if (parameters != null)
            {
                foreach (var parameter in parameters)
                {
                    parameter.AcceptVisitor(visitor);
                }
            }

            propertyReference.PropertyType.AcceptVisitor(visitor);
            propertyReference.DeclaringType.AcceptVisitor(visitor);
        }