Exemple #1
0
        /// <summary>
        /// Defers the binding of the operation until later time when the runtime values of all dynamic operation arguments have been computed.
        /// </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 DynamicMetaObject Defer(DynamicMetaObject target, params DynamicMetaObject[] args)
        {
            ContractUtils.RequiresNotNull(target, "target");

            if (args == null)
            {
                return(MakeDeferred(target.Restrictions, target));
            }
            else
            {
                return(MakeDeferred(
                           target.Restrictions.Merge(BindingRestrictions.Combine(args)),
                           args.AddFirst(target)
                           ));
            }
        }
Exemple #2
0
 /// <summary>
 /// Defers the binding of the operation until later time when the runtime values of all dynamic operation arguments have been computed.
 /// </summary>
 /// <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 DynamicMetaObject Defer(params DynamicMetaObject[] args)
 {
     return(MakeDeferred(BindingRestrictions.Combine(args), args));
 }