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

◆ ExactPropertyBinding()

static PropertyInfo System.DefaultBinder.ExactPropertyBinding ( PropertyInfo[] match,
Type returnType,
Type[] types,
ParameterModifier[] modifiers )
inlinestaticinherited

Definition at line 693 of file DefaultBinder.cs.

694 {
695 if (match == null)
696 {
697 throw new ArgumentNullException("match");
698 }
699 PropertyInfo propertyInfo = null;
700 int num = ((types != null) ? types.Length : 0);
701 for (int i = 0; i < match.Length; i++)
702 {
703 ParameterInfo[] indexParameters = match[i].GetIndexParameters();
704 int j;
705 for (j = 0; j < num; j++)
706 {
707 Type parameterType = indexParameters[j].ParameterType;
708 if (parameterType != types[j])
709 {
710 break;
711 }
712 }
713 if (j >= num && (!(returnType != null) || !(returnType != match[i].PropertyType)))
714 {
715 if (propertyInfo != null)
716 {
717 throw new AmbiguousMatchException(SR.Arg_AmbiguousMatchException);
718 }
719 propertyInfo = match[i];
720 }
721 }
722 return propertyInfo;
723 }

References System.SR.Arg_AmbiguousMatchException, System.match, and System.Reflection.ParameterInfo.ParameterType.

Referenced by System.RuntimeType.GetPropertyImpl().