本文整理汇总了C#中QueryModel.Accept方法的典型用法代码示例。如果您正苦于以下问题:C# QueryModel.Accept方法的具体用法?C# QueryModel.Accept怎么用?C# QueryModel.Accept使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QueryModel
的用法示例。
在下文中一共展示了QueryModel.Accept方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RemoveFetchRequestsFromQueryModel
public static FetchQueryModelBuilder[] RemoveFetchRequestsFromQueryModel (QueryModel queryModel)
{
ArgumentUtility.CheckNotNull ("queryModel", queryModel);
var visitor = new FetchFilteringQueryModelVisitor ();
queryModel.Accept (visitor);
return visitor.FetchQueryModelBuilders.ToArray();
}
示例2: TransformQueryModel
public static SqlStatement TransformQueryModel (
QueryModel queryModel,
ISqlPreparationContext parentPreparationContext,
ISqlPreparationStage stage,
UniqueIdentifierGenerator generator,
ResultOperatorHandlerRegistry resultOperatorHandlerRegistry)
{
ArgumentUtility.CheckNotNull ("queryModel", queryModel);
ArgumentUtility.CheckNotNull ("stage", stage);
ArgumentUtility.CheckNotNull ("generator", generator);
ArgumentUtility.CheckNotNull ("resultOperatorHandlerRegistry", resultOperatorHandlerRegistry);
var visitor = new SqlPreparationQueryModelVisitor (parentPreparationContext, stage, generator, resultOperatorHandlerRegistry);
queryModel.Accept (visitor);
return visitor.GetSqlStatement();
}
示例3: VisitQueryModel
public void VisitQueryModel ()
{
var mainFromClauseMock = _mockRepository.StrictMock<MainFromClause> ("x", typeof (Cook), ExpressionHelper.CreateExpression());
var selectClauseMock = _mockRepository.StrictMock<SelectClause> (ExpressionHelper.CreateExpression());
var queryModel = new QueryModel (mainFromClauseMock, selectClauseMock);
using (_mockRepository.Ordered())
{
_visitorMock
.Expect (mock => mock.VisitQueryModel (queryModel))
.CallOriginalMethod (OriginalCallOptions.CreateExpectation);
mainFromClauseMock.Expect (mock => mock.Accept (_visitorMock, queryModel));
_visitorMock
.Expect (mock => PrivateInvoke.InvokeNonPublicMethod (mock, "VisitBodyClauses", queryModel.BodyClauses, queryModel));
selectClauseMock.Expect (mock => mock.Accept (_visitorMock, queryModel));
_visitorMock
.Expect (mock => PrivateInvoke.InvokeNonPublicMethod (mock, "VisitResultOperators", queryModel.ResultOperators, queryModel));
}
_mockRepository.ReplayAll();
queryModel.Accept (_visitorMock);
_mockRepository.VerifyAll();
}