Dynamic() публичный статический Метод

Creates a DynamicExpression that represents a dynamic operation bound by the provided CallSiteBinder.
The DelegateType property of the result will be inferred from the types of the arguments and the specified return type.
public static Dynamic ( System.Runtime.CompilerServices.CallSiteBinder binder, Type returnType ) : DynamicExpression
binder System.Runtime.CompilerServices.CallSiteBinder The runtime binder for the dynamic operation.
returnType Type The result type of the dynamic expression.
Результат DynamicExpression
Пример #1
0
 /// <summary>
 /// Creates a <see cref="DynamicExpression" /> that represents a dynamic operation bound by the provided <see cref="CallSiteBinder" />.
 /// </summary>
 /// <param name="binder">The runtime binder for the dynamic operation.</param>
 /// <param name="returnType">The result type of the dynamic expression.</param>
 /// <param name="arguments">The arguments to the dynamic operation.</param>
 /// <returns>
 /// A <see cref="DynamicExpression" /> that has <see cref="NodeType" /> equal to
 /// <see cref="ExpressionType.Dynamic">Dynamic</see> and has the
 /// <see cref="DynamicExpression.Binder">Binder</see> and
 /// <see cref="DynamicExpression.Arguments">Arguments</see> set to the specified values.
 /// </returns>
 /// <remarks>
 /// The <see cref="DynamicExpression.DelegateType">DelegateType</see> property of the
 /// result will be inferred from the types of the arguments and the specified return type.
 /// </remarks>
 public static DynamicExpression Dynamic(CallSiteBinder binder, Type returnType, params Expression[] arguments) =>
 DynamicExpression.Dynamic(binder, returnType, arguments);
Пример #2
0
 /// <summary>
 /// Creates a <see cref="DynamicExpression" /> that represents a dynamic operation bound by the provided <see cref="CallSiteBinder" />.
 /// </summary>
 /// <param name="binder">The runtime binder for the dynamic operation.</param>
 /// <param name="returnType">The result type of the dynamic expression.</param>
 /// <param name="arguments">The arguments to the dynamic operation.</param>
 /// <returns>
 /// A <see cref="DynamicExpression" /> that has <see cref="NodeType" /> equal to
 /// <see cref="ExpressionType.Dynamic">Dynamic</see> and has the
 /// <see cref="DynamicExpression.Binder">Binder</see> and
 /// <see cref="DynamicExpression.Arguments">Arguments</see> set to the specified values.
 /// </returns>
 /// <remarks>
 /// The <see cref="DynamicExpression.DelegateType">DelegateType</see> property of the
 /// result will be inferred from the types of the arguments and the specified return type.
 /// </remarks>
 public static DynamicExpression Dynamic(CallSiteBinder binder, Type returnType, IEnumerable <Expression> arguments) =>
 DynamicExpression.Dynamic(binder, returnType, arguments);
Пример #3
0
 /// <summary>
 /// Creates a <see cref="DynamicExpression" /> that represents a dynamic operation bound by the provided <see cref="CallSiteBinder" />.
 /// </summary>
 /// <param name="binder">The runtime binder for the dynamic operation.</param>
 /// <param name="returnType">The result type of the dynamic expression.</param>
 /// <param name="arg0">The first argument to the dynamic operation.</param>
 /// <param name="arg1">The second argument to the dynamic operation.</param>
 /// <param name="arg2">The third argument to the dynamic operation.</param>
 /// <param name="arg3">The fourth argument to the dynamic operation.</param>
 /// <returns>
 /// A <see cref="DynamicExpression" /> that has <see cref="NodeType" /> equal to
 /// <see cref="ExpressionType.Dynamic">Dynamic</see> and has the
 /// <see cref="DynamicExpression.Binder">Binder</see> and
 /// <see cref="DynamicExpression.Arguments">Arguments</see> set to the specified values.
 /// </returns>
 /// <remarks>
 /// The <see cref="DynamicExpression.DelegateType">DelegateType</see> property of the
 /// result will be inferred from the types of the arguments and the specified return type.
 /// </remarks>
 public static DynamicExpression Dynamic(CallSiteBinder binder, Type returnType, Expression arg0, Expression arg1, Expression arg2, Expression arg3) =>
 DynamicExpression.Dynamic(binder, returnType, arg0, arg1, arg2, arg3);
Пример #4
0
 /// <summary>
 ///     Creates a <see cref="DynamicExpression" /> that represents a dynamic operation bound by the provided
 ///     <see cref="CallSiteBinder" />.
 /// </summary>
 /// <param name="binder">The runtime binder for the dynamic operation.</param>
 /// <param name="returnType">The result type of the dynamic expression.</param>
 /// <param name="arg0">The first argument to the dynamic operation.</param>
 /// <param name="arg1">The second argument to the dynamic operation.</param>
 /// <returns>
 ///     A <see cref="DynamicExpression" /> that has <see cref="NodeType" /> equal to
 ///     <see cref="ExpressionType.Dynamic">Dynamic</see> and has the
 ///     <see cref="DynamicExpression.Binder">Binder</see> and
 ///     <see cref="DynamicExpression.Arguments">Arguments</see> set to the specified values.
 /// </returns>
 /// <remarks>
 ///     The <see cref="DynamicExpression.DelegateType">DelegateType</see> property of the
 ///     result will be inferred from the types of the arguments and the specified return type.
 /// </remarks>
 public static DynamicExpression Dynamic(CallSiteBinder binder, Type returnType, Expression arg0, Expression arg1)
 {
     return(DynamicExpression.Dynamic(binder, returnType, arg0, arg1));
 }