Beispiel #1
0
        /// <summary>
        /// Provides a generated accessor for <see cref="System.Linq.Expressions.MemberExpression.Member"/>
        /// visited in <see cref="System.Linq.Expressions.Expression{TDelegate}"/>
        /// </summary>
        /// <param name="member">
        /// <see cref="PropertyInfo"/> or <see cref="FieldInfo"/> from <see cref="System.Linq.Expressions.MemberExpression.Member"/>
        /// </param>
        /// <returns>null if not found</returns>
        public static Accessor?Find(MemberInfo member)
        {
            var path = ReflectionNameBuilder.PropertyFieldSignature(member);

            return(Find(path));
        }
Beispiel #2
0
        /// <summary>
        /// Provides a generated method delegate for <see cref="System.Linq.Expressions.MethodCallExpression.Method"/>
        /// visited in <see cref="System.Linq.Expressions.Expression{TDelegate}"/>
        /// </summary>
        /// <returns>null if not found</returns>
        public static Method?Find(MethodInfo method)
        {
            var signature = ReflectionNameBuilder.MethodSignature(method);

            return(Find(signature));
        }
Beispiel #3
0
        /// <summary>
        /// Provides a generated constructor delegate for <see cref="System.Linq.Expressions.NewExpression.Constructor"/>
        /// visited in <see cref="System.Linq.Expressions.Expression{TDelegate}"/>
        /// </summary>
        /// <returns>null if not found</returns>
        public static Constructor?Find(ConstructorInfo constructor)
        {
            var signature = ReflectionNameBuilder.ConstructorSignature(constructor);

            return(Find(signature));
        }