public override ErrorInfo GetBoundError(ActionBinder binder, DynamicMetaObject instance, Type instanceType) { MethodInfo getter = ResolveGetter(instanceType, binder.PrivateBinding); if (getter == null) { return binder.MakeMissingMemberErrorInfo(DeclaringType, Name); } if (getter.ContainsGenericParameters) { return binder.MakeGenericAccessError(this); } if (IsStatic) { return binder.MakeStaticPropertyInstanceAccessError(this, false, instance); } throw new InvalidOperationException(); }
public override ErrorInfo GetBoundError(ActionBinder binder, DynamicMetaObject instance, Type instanceType) { MethodInfo getter = ResolveGetter(instanceType, binder.PrivateBinding); if (getter == null) { return(binder.MakeMissingMemberErrorInfo(DeclaringType, Name)); } if (getter.ContainsGenericParameters) { return(binder.MakeGenericAccessError(this)); } if (IsStatic) { return(binder.MakeStaticPropertyInstanceAccessError(this, false, instance)); } throw new InvalidOperationException(); }