C# Class NHibernate.Util.ExpressionsHelper

Mostra file Open project: hazzik/nhibernate-core

Public Methods

Method Description
DecodeMemberAccessExpression ( Expression expression ) : MemberInfo

Private Methods

Method Description
GetPropertyType ( IEntityPersister currentEntityPersister, string path ) : IType
GetType ( IEntityPersister currentEntityPersister, IType currentType, MemberMetadata member, ISessionFactoryImplementor sessionFactory ) : IType
GetType ( VisitorParameters parameters, Expression expression ) : IType

Get the mapped type for the given expression.

IsVariable ( Expression expression, string &path, object &closureContext ) : bool

Check whether the given expression represent a variable.

ProcessAssociationType ( IAssociationType associationType, ISessionFactoryImplementor sessionFactory, MemberMetadata member, Type convertType, IType &memberType, IEntityPersister &memberPersister, IAbstractComponentType &memberComponent ) : void
ProcessMembersMetadataResult ( MemberMetadataResult metadataResult, ISessionFactoryImplementor sessionFactory, IType &mappedType, IEntityPersister &entityPersister, IAbstractComponentType &component, string &memberPath ) : bool
TraverseMembers ( ISessionFactoryImplementor sessionFactory, Stack memberPaths, IEntityPersister currentEntityPersister, IType &mappedType, IEntityPersister &entityPersister, IAbstractComponentType &component, string &memberPath ) : bool
TryGetComponentPropertyType ( IAbstractComponentType componentType, string memberPath ) : IType
TryGetDynamicMemberBinder ( InvocationExpression expression, GetMemberBinder &memberBinder ) : bool

Try to retrieve GetMemberBinder from a reduced ExpressionType.Dynamic expression.

TryGetEntityPersister ( IEntityPersister currentEntityPersister, Type convertedType, ISessionFactoryImplementor sessionFactory, IEntityPersister &persister ) : bool
TryGetEntityPersister ( Type convertedType, ISessionFactoryImplementor sessionFactory, IEntityPersister &persister ) : bool
TryGetEntityPersister ( string currentEntityName, Type convertedType, ISessionFactoryImplementor sessionFactory, IEntityPersister &persister ) : bool
TryGetMappedNullability ( ISessionFactoryImplementor sessionFactory, Expression expression, bool &nullable ) : bool

Try to get the mapped nullability from the given expression.

TryGetMappedType ( ISessionFactoryImplementor sessionFactory, Expression expression, IType &mappedType, IEntityPersister &entityPersister, IAbstractComponentType &component, string &memberPath ) : bool

Try to get the mapped type from the given expression. When the expression type is ExpressionType.Convert, the mappedType will be set based on the expression type only when the mapping for UnaryExpression.Operand was found, otherwise will be returned.

When the expression contains an expression of type ExpressionType.Convert, the result may not be correct when casting to an entity that is mapped with multiple entity names. When the expression is polymorphic, the first implementor will be returned. When the expression contains a ConditionalExpression, the first found entity name will be returned from ConditionalExpression.IfTrue or ConditionalExpression.IfFalse. When the expression contains a ExpressionType.Coalesce expression, the first found entity name will be returned from BinaryExpression.Left or BinaryExpression.Right.

Method Details

DecodeMemberAccessExpression() public static method

public static DecodeMemberAccessExpression ( Expression expression ) : MemberInfo
expression Expression
return MemberInfo