Example #1
0
            public override DynamicMetaObject BindUnaryOperation(UnaryOperationBinder binder)
            {
                if (IsOverridden("TryUnaryOperation"))
                {
                    return(CallMethodWithResult("TryUnaryOperation", binder, NoArgs, (e) => binder.FallbackUnaryOperation(this, e)));
                }

                return(base.BindUnaryOperation(binder));
            }
Example #2
0
 /// <summary>
 /// Performs the binding of the dynamic unary operation.
 /// </summary>
 /// <param name="binder">An instance of the <see cref="UnaryOperationBinder"/> that represents the details of the dynamic operation.</param>
 /// <returns>The new <see cref="DynamicMetaObject"/> representing the result of the binding.</returns>
 public virtual DynamicMetaObject BindUnaryOperation(UnaryOperationBinder binder)
 {
     ContractUtils.RequiresNotNull(binder, "binder");
     return(binder.FallbackUnaryOperation(this));
 }