public sealed override DynamicMetaObject Bind(DynamicMetaObject target, DynamicMetaObject[] args)
 {
     ContractUtils.RequiresNotNull(target, "target");
     ContractUtils.RequiresNotNull(args, "args");
     ContractUtils.Requires(args.Length >= 2, "args");
     DynamicMetaObject obj2 = args[args.Length - 1];
     DynamicMetaObject[] array = args.RemoveLast<DynamicMetaObject>();
     ContractUtils.RequiresNotNull(obj2, "args");
     ContractUtils.RequiresNotNullItems<DynamicMetaObject>(array, "args");
     return target.BindSetIndex(this, array, obj2);
 }
Exemple #2
0
        /// <summary>
        /// Performs the binding of the dynamic set index operation.
        /// </summary>
        /// <param name="target">The target of the dynamic set index operation.</param>
        /// <param name="args">An array of arguments of the dynamic set index operation.</param>
        /// <returns>The <see cref="DynamicMetaObject"/> representing the result of the binding.</returns>
        public sealed override DynamicMetaObject Bind(DynamicMetaObject target, DynamicMetaObject[] args) {
            ContractUtils.RequiresNotNull(target, "target");
            ContractUtils.RequiresNotNull(args, "args");
            ContractUtils.Requires(args.Length >= 2, "args");

            DynamicMetaObject value = args[args.Length - 1];
            DynamicMetaObject[] indexes = args.RemoveLast();

            ContractUtils.RequiresNotNull(value, "args");
            ContractUtils.RequiresNotNullItems(indexes, "args");

            return target.BindSetIndex(this, indexes, value);
        }