コード例 #1
0
ファイル: QueryExecutor.cs プロジェクト: Epitomy/CMS
        public static object Execute(IContentQuery <TextContent> contentQuery)
        {
            QueryExecutorBase queryExecutor = null;

            if (contentQuery is CategoriesQuery)
            {
                queryExecutor = new CategoriesQueryExecutor((CategoriesQuery)contentQuery);
            }
            //else if (contentQuery is CategorizablesQuery)
            //{
            //    queryExecutor = new CategorizablesQueryExecutor((CategorizablesQuery)contentQuery);
            //}
            else if (contentQuery is ParentQuery)
            {
                queryExecutor = new ParentQueryExecutor((ParentQuery)contentQuery);
            }
            else if (contentQuery is ChildrenQuery)
            {
                queryExecutor = new ChildrenQueryExecutor((ChildrenQuery)contentQuery);
            }
            else if (contentQuery is TextContentQuery)
            {
                queryExecutor = new TextContentQueryExecutor((TextContentQuery)contentQuery);
            }
            return(queryExecutor.Execute());
        }
コード例 #2
0
ファイル: QueryExecutor.cs プロジェクト: Epitomy/CMS
 public static object Execute(IContentQuery<TextContent> contentQuery)
 {
     QueryExecutorBase queryExecutor = null;
     if (contentQuery is CategoriesQuery)
     {
         queryExecutor = new CategoriesQueryExecutor((CategoriesQuery)contentQuery);
     }
     //else if (contentQuery is CategorizablesQuery)
     //{
     //    queryExecutor = new CategorizablesQueryExecutor((CategorizablesQuery)contentQuery);
     //}
     else if (contentQuery is ParentQuery)
     {
         queryExecutor = new ParentQueryExecutor((ParentQuery)contentQuery);
     }
     else if (contentQuery is ChildrenQuery)
     {
         queryExecutor = new ChildrenQueryExecutor((ChildrenQuery)contentQuery);
     }
     else if (contentQuery is TextContentQuery)
     {
         queryExecutor = new TextContentQueryExecutor((TextContentQuery)contentQuery);
     }
     return queryExecutor.Execute();
 }