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

BindUnaryOperation() public method

Performs the binding of the dynamic unary operation.
public BindUnaryOperation ( UnaryOperationBinder binder ) : DynamicMetaObject
binder UnaryOperationBinder An instance of the that represents the details of the dynamic operation.
return DynamicMetaObject
        public virtual DynamicMetaObject BindUnaryOperation(UnaryOperationBinder binder)
        {
            ContractUtils.RequiresNotNull(binder, nameof(binder));
            return binder.FallbackUnaryOperation(this);
        }

Usage Example

        /// <summary>
        /// Performs the binding of the dynamic unary 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.Requires(args == null || args.Length == 0, "args");

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