/// <summary> /// Performs binding of the operation on the target (represented as meta object) and /// list of arguments (indexes and right-hand value) represented as meta objects /// </summary> /// <param name="target">Target of the operation.</param> /// <param name="args">List of indexes and right-hand value</param> /// <returns>MetaObject representing the binding.</returns> public sealed override MetaObject Bind(MetaObject target, MetaObject[] args) { ContractUtils.RequiresNotNull(target, "target"); ContractUtils.RequiresNotNull(args, "args"); ContractUtils.Requires(args.Length >= 2, "args"); MetaObject value = args[args.Length - 1]; MetaObject[] indexes = args.RemoveLast(); ContractUtils.RequiresNotNull(value, "args"); ContractUtils.RequiresNotNullItems(indexes, "args"); return(target.BindBinaryOperationOnIndex(this, indexes, value)); }
/// <summary> /// Performs binding of the operation on the target (represented as meta object) and /// list of arguments (indexes and right-hand value) represented as meta objects /// </summary> /// <param name="target">Target of the operation.</param> /// <param name="args">List of indexes and right-hand value</param> /// <returns>MetaObject representing the binding.</returns> public sealed override MetaObject Bind(MetaObject target, MetaObject[] args) { ContractUtils.RequiresNotNull(target, "target"); ContractUtils.RequiresNotNull(args, "args"); ContractUtils.Requires(args.Length >= 2, "args"); MetaObject value = args[args.Length - 1]; MetaObject[] indexes = args.RemoveLast(); ContractUtils.RequiresNotNull(value, "args"); ContractUtils.RequiresNotNullItems(indexes, "args"); return target.BindBinaryOperationOnIndex(this, indexes, value); }