本文整理匯總了C#中System.Linq.Expressions.Expression.GetConstantValue方法的典型用法代碼示例。如果您正苦於以下問題:C# Expression.GetConstantValue方法的具體用法?C# Expression.GetConstantValue怎麽用?C# Expression.GetConstantValue使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類System.Linq.Expressions.Expression
的用法示例。
在下文中一共展示了Expression.GetConstantValue方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: HandleTake
/// <summary>
/// Handles take.
/// </summary>
/// <param name="exp">The expression.</param>
private void HandleTake(Expression exp)
{
FlyWeight["$limit"] = (int)exp.GetConstantValue();
}
示例2: HandleSkip
/// <summary>
/// Handles skip.
/// </summary>
/// <param retval="exp">The expression.</param>
private void HandleSkip(Expression exp)
{
Skip = exp.GetConstantValue<int>();
}
示例3: HandleSkip
/// <summary>
/// Handles skip.
/// </summary>
/// <param name="exp">The expression.</param>
private void HandleSkip(Expression exp)
{
FlyWeight["$skip"] = (int)exp.GetConstantValue();
}
示例4: HandleTake
/// <summary>
/// Handles take.
/// </summary>
/// <param retval="exp">The expression.</param>
private void HandleTake(Expression exp)
{
Take = exp.GetConstantValue<int>();
}
示例5: HandleTake
/// <summary>
/// Handles take.
/// </summary>
/// <param name="exp">The expression.</param>
private void HandleTake(Expression exp)
{
this.Take = (int)exp.GetConstantValue();
}
示例6: HandleSkip
/// <summary>
/// Handles skip.
/// </summary>
/// <param name="exp">The expression.</param>
private void HandleSkip(Expression exp)
{
this.Skip = (int)exp.GetConstantValue();
}
示例7: HandleTake
void HandleTake(Expression exp)
{
fly["$limit"] = (int)exp.GetConstantValue();
}
示例8: HandleSkip
void HandleSkip(Expression exp)
{
fly["$skip"] = (int)exp.GetConstantValue();
}