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


C# FromElement.GetPropertyType方法代码示例

本文整理汇总了C#中NHibernate.Hql.Ast.ANTLR.Tree.FromElement.GetPropertyType方法的典型用法代码示例。如果您正苦于以下问题:C# FromElement.GetPropertyType方法的具体用法?C# FromElement.GetPropertyType怎么用?C# FromElement.GetPropertyType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在NHibernate.Hql.Ast.ANTLR.Tree.FromElement的用法示例。


在下文中一共展示了FromElement.GetPropertyType方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetNakedPropertyType

		private IType GetNakedPropertyType(FromElement fromElement)
		{
			if (fromElement == null)
			{
				return null;
			}

			string property = OriginalText;
			IType propertyType = null;

			try
			{
				propertyType = fromElement.GetPropertyType(property, property);
			}
			catch (Exception)
			{
			}
			return propertyType;
		}
开发者ID:hazzik,项目名称:nh-contrib-everything,代码行数:19,代码来源:IdentNode.cs

示例2: ResolveCollectionProperty

		public void ResolveCollectionProperty(IASTNode expr)
		{
			String propertyName = CollectionProperties.GetNormalizedPropertyName( _methodName );

			if ( expr is FromReferenceNode ) 
			{
				FromReferenceNode collectionNode = ( FromReferenceNode ) expr;
				// If this is 'elements' then create a new FROM element.
				if ( CollectionPropertyNames.Elements == propertyName ) 
				{
					HandleElements( collectionNode, propertyName );
				}
				else {
					// Not elements(x)
					_fromElement = collectionNode.FromElement;
					DataType = _fromElement.GetPropertyType( propertyName, propertyName );
					_selectColumns = _fromElement.ToColumns( _fromElement.TableAlias, propertyName, _inSelect );
				}
				if ( collectionNode is DotNode ) 
				{
					PrepareAnyImplicitJoins( ( DotNode ) collectionNode );
				}
				if ( !_inSelect ) 
				{
					_fromElement.Text = "";
					_fromElement.UseWhereFragment = false;
				}

				PrepareSelectColumns( _selectColumns );
				Text = _selectColumns[0];
				Type = HqlSqlWalker.SQL_TOKEN;
			}
			else 
			{
				throw new SemanticException( 
						"Unexpected expression " + expr + 
						" found for collection function " + propertyName 
					);
			}
		}
开发者ID:hazzik,项目名称:nh-contrib-everything,代码行数:40,代码来源:MethodNode.cs

示例3: ResolveCollectionProperty

		public void ResolveCollectionProperty(IASTNode expr)
		{
			var propertyName = CollectionProperties.GetNormalizedPropertyName( _methodName );

			var collectionNode = expr as FromReferenceNode;
			if (collectionNode == null)
				throw new SemanticException(string.Format("Unexpected expression {0} found for collection function {1}", expr, propertyName));

			// If this is 'elements' then create a new FROM element.
			if (CollectionPropertyNames.Elements == propertyName)
			{
				HandleElements(collectionNode, propertyName);
			}
			else
			{
				// Not elements(x)
				_fromElement = collectionNode.FromElement;
				DataType = _fromElement.GetPropertyType(propertyName, propertyName);
				_selectColumns = _fromElement.ToColumns(_fromElement.TableAlias, propertyName, _inSelect);
			}
			var dotNode = collectionNode as DotNode;
			if (dotNode != null)
			{
				PrepareAnyImplicitJoins(dotNode);
			}
			if (!_inSelect)
			{
				_fromElement.Text = "";
				_fromElement.UseWhereFragment = false;
			}

			PrepareSelectColumns(_selectColumns);
			Text = _selectColumns[0];
			Type = HqlSqlWalker.SQL_TOKEN;
		}
开发者ID:marchlud,项目名称:nhibernate-core,代码行数:35,代码来源:MethodNode.cs


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