Microsoft.CSharp.RuntimeBinder.RuntimeBinder.IsBinderThatCanHaveRefReceiver C# (CSharp) Method

IsBinderThatCanHaveRefReceiver() private method

private IsBinderThatCanHaveRefReceiver ( DynamicMetaObjectBinder binder ) : bool
binder System.Dynamic.DynamicMetaObjectBinder
return bool
        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;
        }