C# 클래스 Pathoschild.WebApi.NhibernateOdata.Internal.FixComponentNullCheckVisitor

Intercepts queries before they're parsed by NHibernate to rewrite null check for components which aren't necessary for NHibernate. NHibernate does not support checking for null on components which have 4 or more properties mapped. I don't know why really, but it crashes with a recognition error in the HQL.
The expression tree generated by the ODataQueryOptions.ApplyTo method looks like the following sample. .Call System.Linq.Queryable.Where( .Constant<NHibernate.Linq.NhQueryable`1[Pathoschild.WebApi.NhibernateOdata.Tests.Models.Parent]>(NHibernate.Linq.NhQueryable`1[Pathoschild.WebApi.NhibernateOdata.Tests.Models.Parent]), '(.Lambda #Lambda1<System.Func`2[Pathoschild.WebApi.NhibernateOdata.Tests.Models.Parent,System.Boolean]>)) .Lambda #Lambda1<System.Func`2[Pathoschild.WebApi.NhibernateOdata.Tests.Models.Parent,System.Boolean]>(Pathoschild.WebApi.NhibernateOdata.Tests.Models.Parent $$it) { (.If ($$it.Component == null) { null } .Else { (System.Nullable`1[System.Int32])($$it.Component).Two } == (System.Nullable`1[System.Int32]).Constant<System.Web.Http.OData.Query.Expressions.LinqParameterContainer+TypedLinqParameterContainer`1[System.Int32]>(System.Web.Http.OData.Query.Expressions.LinqParameterContainer+TypedLinqParameterContainer`1[System.Int32]).TypedProperty) == True }
상속: System.Linq.Expressions.ExpressionVisitor
파일 보기 프로젝트 열기: Pathoschild/webapi.nhibernate-odata

공개 메소드들

메소드 설명
Visit ( Expression node ) : Expression

Dispatches the expression to one of the more specialized visit methods in this class.

비공개 메소드들

메소드 설명
HandleConditionalExpression ( Expression original, ConditionalExpression ifElse ) : Expression

Handles the conditional expression (equivalent to .If {} .Else {} in the sample expression tree in the FixStringMethodsVisitor remarks).

메소드 상세

Visit() 공개 메소드

Dispatches the expression to one of the more specialized visit methods in this class.
public Visit ( Expression node ) : Expression
node System.Linq.Expressions.Expression The expression to visit.
리턴 System.Linq.Expressions.Expression