<PackageReference Include="Microsoft.CSharp" Version="4.4.1" />

CSharpSetIndexBinder

using System; using System.Collections.Generic; using System.Dynamic; namespace Microsoft.CSharp.RuntimeBinder { internal sealed class CSharpSetIndexBinder : SetIndexBinder { private bool _bIsCompoundAssignment; private bool _isChecked; private Type _callingContext; private List<CSharpArgumentInfo> _argumentInfo; private RuntimeBinder _binder; internal bool IsCompoundAssignment => _bIsCompoundAssignment; internal bool IsChecked => _isChecked; internal Type CallingContext => _callingContext; internal IList<CSharpArgumentInfo> ArgumentInfo => _argumentInfo.AsReadOnly(); public CSharpSetIndexBinder(bool isCompoundAssignment, bool isChecked, Type callingContext, IEnumerable<CSharpArgumentInfo> argumentInfo) : base(BinderHelper.CreateCallInfo(argumentInfo, 2)) { _bIsCompoundAssignment = isCompoundAssignment; _isChecked = isChecked; _callingContext = callingContext; _argumentInfo = BinderHelper.ToList(argumentInfo); _binder = RuntimeBinder.GetInstance(); } public override DynamicMetaObject FallbackSetIndex(DynamicMetaObject target, DynamicMetaObject[] indexes, DynamicMetaObject value, DynamicMetaObject errorSuggestion) { return BinderHelper.Bind(this, _binder, BinderHelper.Cons(target, indexes, value), _argumentInfo, errorSuggestion); } } }