本文整理汇总了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();
}