本文整理汇总了C#中IExpressionNode类的典型用法代码示例。如果您正苦于以下问题:C# IExpressionNode类的具体用法?C# IExpressionNode怎么用?C# IExpressionNode使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IExpressionNode类属于命名空间,在下文中一共展示了IExpressionNode类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnChildNode
protected override ISqlNode OnChildNode(ISqlNode node)
{
if (node is IExpressionNode)
Password = (IExpressionNode) node;
return base.OnChildNode(node);
}
示例2: MemberExpressionNode
public MemberExpressionNode(IExpressionNode target, [NotNull] string member)
: base(ExpressionNodeType.Member)
{
Should.NotBeNull(member, nameof(member));
_target = target;
_member = member;
}
示例3: ApplyAllNodes
private QueryModel ApplyAllNodes(IExpressionNode node, ClauseGenerationContext clauseGenerationContext)
{
QueryModel queryModel = null;
if (node.Source != null)
queryModel = ApplyAllNodes(node.Source, clauseGenerationContext);
return node.Apply(queryModel, clauseGenerationContext);
}
示例4: Build
public static SqlExpression Build(IExpressionNode node)
{
if (node is SqlVariableRefExpressionNode)
return VisitVariableRefExpression((SqlVariableRefExpressionNode) node);
if (node is SqlExpressionTupleNode)
return VisitTupleExpression((SqlExpressionTupleNode) node);
if (node is SqlQueryExpressionNode)
return VisitQueryExpression((SqlQueryExpressionNode) node);
if (node is SqlCaseExpressionNode)
return VisitCaseExpression((SqlCaseExpressionNode) node);
if (node is SqlConstantExpressionNode)
return VisitConstantExpression((SqlConstantExpressionNode) node);
if (node is SqlFunctionCallExpressionNode)
return VisitFunctionCall((SqlFunctionCallExpressionNode) node);
if (node is SqlReferenceExpressionNode)
return VisitReferenceExpression((SqlReferenceExpressionNode) node);
if (node is SqlBinaryExpressionNode)
return VisitBinaryExpression((SqlBinaryExpressionNode) node);
if (node is SqlUnaryExpressionNode)
return VisitUnaryExpression((SqlUnaryExpressionNode) node);
if (node is SqlBetweenExpressionNode)
return VisitBetweenExpression((SqlBetweenExpressionNode) node);
throw new NotSupportedException();
}
示例5: UnaryExressionNode
public UnaryExressionNode([NotNull] IExpressionNode operand, TokenType token)
: base(ExpressionNodeType.Unary)
{
Should.NotBeNull(operand, "operand");
_operand = operand;
_token = token;
}
示例6: Deserialize
protected virtual void Deserialize(StringReader reader)
{
Children = new IExpressionNode[int.Parse(reader.ReadLine())];
for (int i = 0; i < Children.Length; i++)
Children[i] = PExpressionUtility.DeserializeNode(reader);
}
示例7: BinaryExpressionNode
/// <summary>
/// Initializes a new instance of the <see cref="BinaryExpressionNode" /> class.
/// </summary>
public BinaryExpressionNode([NotNull] IExpressionNode left, [NotNull] IExpressionNode right, TokenType token)
: base(ExpressionNodeType.Binary)
{
Should.NotBeNull(left, "left");
Should.NotBeNull(right, "right");
_left = left;
_right = right;
_token = token;
}
示例8: OnChildNode
/// <inheritdoc/>
protected override ISqlNode OnChildNode(ISqlNode node)
{
if (node.NodeName == "sql_expression_list") {
GetGroupExpressions(node);
} else if (node.NodeName == "having_clause_opt") {
HavingExpression = node.ChildNodes.FirstOrDefault() as IExpressionNode;
}
return base.OnChildNode(node);
}
示例9: OnChildNode
protected override ISqlNode OnChildNode(ISqlNode node)
{
if (node.NodeName.Equals("label_opt")) {
Label = node.FindNode<StringLiteralNode>().Value;
} else if (node.NodeName.Equals("when_opt")) {
WhenExpression = node.FindNode<IExpressionNode>();
}
return base.OnChildNode(node);
}
示例10: CreateSelectMany
public static SelectManyExpressionNode CreateSelectMany (IExpressionNode source)
{
var p1 = Expression.Parameter (typeof (Cook), "s");
var p2 = Expression.Parameter (typeof (Kitchen), "sd");
var resultSelector = Expression.Lambda (Expression.Constant (null), p1, p2);
var collectionSelector = Expression.Lambda (Expression.Constant (null), p1);
var parseInfo = new MethodCallExpressionParseInfo ("trans", source, ExpressionHelper.CreateMethodCallExpression<Cook> ());
return new SelectManyExpressionNode (parseInfo, collectionSelector, resultSelector);
}
示例11: ArgumentData
public ArgumentData(IExpressionNode node, Expression expression, Type type, bool isTypeAccess)
{
Should.NotBeNull(node, "node");
_node = node;
_expression = expression;
if (type == null && expression != null)
type = expression.Type;
_type = type;
_isTypeAccess = isTypeAccess;
}
示例12: OnChildNode
protected override ISqlNode OnChildNode(ISqlNode node)
{
if (node is IdentifierNode) {
ColumnName = ((IdentifierNode) node).Text;
} else if (node is IExpressionNode) {
Expression = (IExpressionNode) node;
}
return base.OnChildNode(node);
}
示例13: SerializeNode
public static void SerializeNode(IExpressionNode node, StringWriter writer)
{
if (node == null)
writer.WriteLine((int)ExpressionTypes.Null);
else
{
writer.WriteLine((int)node.Type);
writer.WriteLine(JsonUtility.ToJson(node));
}
}
示例14: GetContextInfo
public object GetContextInfo (IExpressionNode node)
{
ArgumentUtility.CheckNotNull ("node", node);
object contextInfo;
if (!_lookup.TryGetValue (node, out contextInfo))
throw new KeyNotFoundException ("Node has no associated context info.");
return contextInfo;
}
示例15: LambdaExpressionNode
public LambdaExpressionNode([NotNull] IExpressionNode expression, [CanBeNull] IEnumerable<string> parameters)
: base(ExpressionNodeType.Lambda)
{
Should.NotBeNull(expression, "expression");
_expression = expression;
_parameters = parameters == null
? Empty.Array<string>()
: parameters.ToArray();
BindingExtensions.CheckDuplicateLambdaParameter(Parameters);
}