Ejemplo n.º 1
0
            public override DynamicMetaObject BindGetIndex(GetIndexBinder binder, DynamicMetaObject[] indexes)
            {
                if (IsOverridden("TryGetIndex"))
                {
                    return(CallMethodWithResult("TryGetIndex", binder, DynamicMetaObject.GetExpressions(indexes), (e) => binder.FallbackGetIndex(this, indexes, e)));
                }

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