本文整理汇总了C#中IASTNode.ToStringTree方法的典型用法代码示例。如果您正苦于以下问题:C# IASTNode.ToStringTree方法的具体用法?C# IASTNode.ToStringTree怎么用?C# IASTNode.ToStringTree使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IASTNode
的用法示例。
在下文中一共展示了IASTNode.ToStringTree方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetDebugstring
/// <summary>
/// Returns the 'list' representation with some brackets around it for debugging.
/// </summary>
/// <param name="n">The tree.</param>
/// <returns>The list representation of the tree.</returns>
public static string GetDebugstring(IASTNode n)
{
StringBuilder buf = new StringBuilder();
buf.Append("[ ");
buf.Append((n == null) ? "{null}" : n.ToStringTree());
buf.Append(" ]");
return buf.ToString();
}
示例2: ShowAsString
public string ShowAsString(IASTNode ast, string header)
{
return ast.ToStringTree();
}
示例3: ProcessQuery
void ProcessQuery(IASTNode select, IASTNode query)
{
if ( log.IsDebugEnabled ) {
log.Debug( "processQuery() : " + query.ToStringTree() );
}
try {
QueryNode qn = ( QueryNode ) query;
// Was there an explicit select expression?
bool explicitSelect = select != null && select.ChildCount > 0;
if ( !explicitSelect ) {
// No explicit select expression; render the id and properties
// projection lists for every persister in the from clause into
// a single 'token node'.
//TODO: the only reason we need this stuff now is collection filters,
// we should get rid of derived select clause completely!
CreateSelectClauseFromFromClause( qn );
}
else {
// Use the explicitly declared select expression; determine the
// return types indicated by each select token
UseSelectClause( select );
}
// After that, process the JOINs.
// Invoke a delegate to do the work, as this is farily complex.
JoinProcessor joinProcessor = new JoinProcessor( this );
joinProcessor.ProcessJoins( qn );
// Attach any mapping-defined "ORDER BY" fragments
foreach (FromElement fromElement in qn.FromClause.GetProjectionList())
{
if ( fromElement.IsFetch && fromElement.QueryableCollection != null )
{
// Does the collection referenced by this FromElement
// specify an order-by attribute? If so, attach it to
// the query's order-by
if ( fromElement.QueryableCollection.HasOrdering)
{
string orderByFragment = fromElement
.QueryableCollection
.GetSQLOrderByString( fromElement.TableAlias );
qn.GetOrderByClause().AddOrderFragment( orderByFragment );
}
if ( fromElement.QueryableCollection.HasManyToManyOrdering )
{
string orderByFragment = fromElement.QueryableCollection
.GetManyToManyOrderByString( fromElement.TableAlias );
qn.GetOrderByClause().AddOrderFragment( orderByFragment );
}
}
}
}
finally
{
PopFromClause();
}
}
示例4: HqlExpression
public HqlExpression(HqlQuery node, System.Type type)
{
_node = node.AstNode;
_type = type;
_key = _node.ToStringTree();
}