当前位置: 首页>>代码示例>>C#>>正文


C# IASTNode.ToStringTree方法代码示例

本文整理汇总了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();
		}
开发者ID:jlevitt,项目名称:nhibernate-core,代码行数:13,代码来源:ASTUtil.cs

示例2: ShowAsString

		public string ShowAsString(IASTNode ast, string header)
		{
            return ast.ToStringTree();
		}
开发者ID:hazzik,项目名称:nh-contrib-everything,代码行数:4,代码来源:ASTPrinter.cs

示例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();
			}
		}
开发者ID:jlevitt,项目名称:nhibernate-core,代码行数:60,代码来源:HqlSqlWalker.cs

示例4: HqlExpression

 public HqlExpression(HqlQuery node, System.Type type)
 {
     _node = node.AstNode;
     _type = type;
     _key = _node.ToStringTree();
 }
开发者ID:nkmajeti,项目名称:nhibernate,代码行数:6,代码来源:HqlExpression.cs


注:本文中的IASTNode.ToStringTree方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。