System.Linq.Expressions.Expression.FindProperty C# (CSharp) Method

FindProperty() private static method

private static FindProperty ( Type type, string propertyName, Expression arguments, BindingFlags flags ) : PropertyInfo
type Type
propertyName string
arguments Expression
flags BindingFlags
return System.Reflection.PropertyInfo
        private static PropertyInfo FindProperty(Type type, string propertyName, Expression[] arguments, BindingFlags flags)
        {
            PropertyInfo property = null;

            foreach (PropertyInfo pi in type.GetProperties(flags))
            {
                if (pi.Name.Equals(propertyName, StringComparison.OrdinalIgnoreCase) && IsCompatible(pi, arguments))
                {
                    if (property == null)
                    {
                        property = pi;
                    }
                    else
                    {
                        throw Error.PropertyWithMoreThanOneMatch(propertyName, type);
                    }
                }
            }

            return property;
        }
Expression