System.Dynamic.DynamicMetaObject.BindGetIndex C# (CSharp) Method

BindGetIndex() public method

Performs the binding of the dynamic get index operation.
public BindGetIndex ( GetIndexBinder binder, DynamicMetaObject indexes ) : DynamicMetaObject
binder GetIndexBinder An instance of the that represents the details of the dynamic operation.
indexes DynamicMetaObject An array of instances - indexes for the get index operation.
return DynamicMetaObject
        public virtual DynamicMetaObject BindGetIndex(GetIndexBinder binder, DynamicMetaObject[] indexes)
        {
            ContractUtils.RequiresNotNull(binder, nameof(binder));
            return binder.FallbackGetIndex(this, indexes);
        }

Usage Example

Example #1
0
        /// <summary>
        /// Performs the binding of the dynamic get index operation.
        /// </summary>
        /// <param name="target">The target of the dynamic get index operation.</param>
        /// <param name="args">An array of arguments of the dynamic get 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.RequiresNotNullItems(args, "args");

            return(target.BindGetIndex(this, args));
        }
All Usage Examples Of System.Dynamic.DynamicMetaObject::BindGetIndex