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

BindBinaryOperation() public method

Performs the binding of the dynamic binary operation.
public BindBinaryOperation ( BinaryOperationBinder binder, DynamicMetaObject arg ) : DynamicMetaObject
binder BinaryOperationBinder An instance of the that represents the details of the dynamic operation.
arg DynamicMetaObject An instance of the representing the right hand side of the binary operation.
return DynamicMetaObject
        public virtual DynamicMetaObject BindBinaryOperation(BinaryOperationBinder binder, DynamicMetaObject arg)
        {
            ContractUtils.RequiresNotNull(binder, nameof(binder));
            return binder.FallbackBinaryOperation(this, arg);
        }

Usage Example

Esempio n. 1
0
        /// <summary>
        /// Performs the binding of the dynamic binary operation.
        /// </summary>
        /// <param name="target">The target of the dynamic operation.</param>
        /// <param name="args">An array of arguments of the dynamic 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");
            ContractUtils.Requires(args.Length == 1);

            return target.BindBinaryOperation(this, args[0]);
        }
All Usage Examples Of System.Dynamic.DynamicMetaObject::BindBinaryOperation