public List<INode> FindLatestBlogPosts(NodeOrder order) { INode blogHome = FindBlogHome(); if (blogHome == null) { throw new Exception("Blog home was not found"); } IEnumerable<INode> blogPosts = nodeDao.FindDescendants(FindBlogHome(), new List<string> { "BlogPost" }, new List<int> { 3 }); if (order.Equals(NodeOrder.DateAndTimeDescending)) { blogPosts = OrderingUtil.OrderByCreateDate(blogPosts, Order.Descending); } else { blogPosts = OrderingUtil.OrderByCreateDate(blogPosts, Order.Ascending); } return blogPosts.ToList(); }
public List<INode> FindThemedCategoryArticles(INode theme, NodeOrder order, int startAt = 0) { IEnumerable<INode> articles = FindAllCategoryArticles(FindCurrentSection(theme), order); var themeArticles = new List<INode>(); foreach (var article in articles) { IProperty themeProperty = article.GetProperty("applicableThemes"); if (themeProperty != null) { string themes = themeProperty.Value; if (themes.Contains(theme.Id.ToString())) { themeArticles.Add(article); } } } return themeArticles; }
private static void test10() //****************************************************************************80 // // Purpose: // // TEST10 tests NODE_ORDER_Q4_MESH. // // Licensing: // // This code is distributed under the GNU LGPL license. // // Modified: // // 23 February 2009 // // Author: // // John Burkardt // { int element_num = 0; int hole_num = 0; int node_num = 0; Console.WriteLine(""); Console.WriteLine("TEST10"); Console.WriteLine(" NODE_ORDER_4_MESH computes the order"); Console.WriteLine(" of the nodes in a Q4 mesh."); Burkardt.Values.QuadMesh.example1_q4_mesh_size(ref node_num, ref element_num, ref hole_num); int[] element_neighbor = new int[4 * element_num]; int[] element_node = new int[4 * element_num]; double[] node_xy = new double[2 * node_num]; Burkardt.Values.QuadMesh.example1_q4_mesh(node_num, element_num, ref node_xy, ref element_node, ref element_neighbor); int[] node_order = NodeOrder.node_order_q4_mesh(element_num, element_node, node_num); typeMethods.i4vec_print(node_num, node_order, " NODE ORDER"); }
private void nodeTypeToolStripMenuItem_Click(object sender, EventArgs e) { OrderNodesBy = NodeOrder.NodeType; }
// Private Methods (31) private void alphaNumericToolStripMenuItem_Click(object sender, EventArgs e) { OrderNodesBy = NodeOrder.AlphaNumeric; }
public List<INode> FindAllCategoryArticles(INode category, NodeOrder order, int startAt = 0) { IEnumerable<INode> nodes = nodeDao.FindDescendants(category, new List<string> { "Article" }, new List<int> { 4 }); return OrderingUtil.OrderByCreateDate(nodes, order == NodeOrder.DateAndTimeAscending ? Order.Ascending : Order.Descending); }