Exemplo n.º 1
0
            public override DynamicMetaObject BindSetIndex(SetIndexBinder binder, DynamicMetaObject[] indexes, DynamicMetaObject value)
            {
                if (IsOverridden("TrySetIndex"))
                {
                    return(CallMethodReturnLast("TrySetIndex", binder, DynamicMetaObject.GetExpressions(indexes), value.Expression, (e) => binder.FallbackSetIndex(this, indexes, value, e)));
                }

                return(base.BindSetIndex(binder, indexes, value));
            }
Exemplo n.º 2
0
 /// <summary>
 /// Performs the binding of the dynamic set index operation.
 /// </summary>
 /// <param name="binder">An instance of the <see cref="SetIndexBinder"/> that represents the details of the dynamic operation.</param>
 /// <param name="indexes">An array of <see cref="DynamicMetaObject"/> instances - indexes for the set index operation.</param>
 /// <param name="value">The <see cref="DynamicMetaObject"/> representing the value for the set index operation.</param>
 /// <returns>The new <see cref="DynamicMetaObject"/> representing the result of the binding.</returns>
 public virtual DynamicMetaObject BindSetIndex(SetIndexBinder binder, DynamicMetaObject[] indexes, DynamicMetaObject value)
 {
     ContractUtils.RequiresNotNull(binder, "binder");
     return(binder.FallbackSetIndex(this, indexes, value));
 }