public override DynamicMetaObject BindUnaryOperation(UnaryOperationBinder binder) { Fallback fallback = null; if (!this.IsOverridden("TryUnaryOperation")) { return(base.BindUnaryOperation(binder)); } if (fallback == null) { fallback = e => binder.FallbackUnaryOperation(this, e); } return(this.CallMethodWithResult("TryUnaryOperation", binder, NoArgs, fallback)); }
/// <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)); }
public override DynamicMetaObject BindUnaryOperation(UnaryOperationBinder binder) { if (IsOverridden("TryUnaryOperation")) { return CallMethodWithResult("TryUnaryOperation", binder, NoArgs, (e) => binder.FallbackUnaryOperation(this, e)); } return base.BindUnaryOperation(binder); }
public override DynamicMetaObject BindUnaryOperation(UnaryOperationBinder binder) { if (IsOverridden("TryUnaryOperation")) { return(CallMethodWithResult("TryUnaryOperation", binder, s_noArgs, (e) => binder.FallbackUnaryOperation(this, e))); } return(base.BindUnaryOperation(binder)); }
/// <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); }
public override DynamicMetaObject BindUnaryOperation(UnaryOperationBinder binder) { return binder.FallbackUnaryOperation(this); }
/// <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) { ArgumentNullException.ThrowIfNull(binder); return(binder.FallbackUnaryOperation(this)); }
public override DynamicMetaObject BindUnaryOperation(UnaryOperationBinder binder) { Fallback fallback = null; if (!this.IsOverridden("TryUnaryOperation")) { return base.BindUnaryOperation(binder); } if (fallback == null) { fallback = e => binder.FallbackUnaryOperation(this, e); } return this.CallMethodWithResult("TryUnaryOperation", binder, NoArgs, fallback); }
public override DynamicMetaObject BindUnaryOperation( UnaryOperationBinder binder ) { return binder.FallbackUnaryOperation( _baseMetaObject, AddTypeRestrictions( _metaObject.BindUnaryOperation( binder ) ) ); }