Ejemplo n.º 1
0
        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());
        }
Ejemplo n.º 2
0
 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();
 }