Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ FindProperty()

static PropertyInfo System.Linq.Expressions.Expression< TDelegate >.FindProperty ( [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties)] Type type,
string propertyName,
Expression< TDelegate >[] arguments,
BindingFlags flags )
inlinestaticprivateinherited

Definition at line 2870 of file Expression.cs.

2871 {
2872 PropertyInfo propertyInfo = null;
2873 PropertyInfo[] properties = type.GetProperties(flags);
2874 foreach (PropertyInfo propertyInfo2 in properties)
2875 {
2876 if (propertyInfo2.Name.Equals(propertyName, StringComparison.OrdinalIgnoreCase) && IsCompatible(propertyInfo2, arguments))
2877 {
2878 if (!(propertyInfo == null))
2879 {
2880 throw Error.PropertyWithMoreThanOneMatch(propertyName, type);
2881 }
2882 propertyInfo = propertyInfo2;
2883 }
2884 }
2885 return propertyInfo;
2886 }
static bool IsCompatible(PropertyInfo pi, Expression[] args)

References System.Linq.Expressions.Expression< TDelegate >.IsCompatible(), System.Linq.Expressions.Error.PropertyWithMoreThanOneMatch(), and System.type.

Referenced by System.Linq.Expressions.Expression< TDelegate >.FindInstanceProperty().