private bool IsBinderThatCanHaveRefReceiver(DynamicMetaObjectBinder binder)
{
// This is true for any binder that is eligible to take value type receiver
// objects as a ref (for mutable operations). Such as calls ("v.M(d)"),
// and indexers ("v[d] = v[d]"). Note that properties are not here because they
// are only dispatched dynamically when the receiver is dynamic, and hence boxed.
return binder is ICSharpInvokeOrInvokeMemberBinder || binder is CSharpSetIndexBinder || binder is CSharpGetIndexBinder;
}