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