public void TestJoinedList() { var a = new List<int> {1, 2, 3, 4}; var b = new List<int> {5, 6, 7, 8}; var j = new JoinedList<int>(a, b); Assert.AreEqual(8, j.Count); Assert.AreEqual(6, j[5]); }
public JoinedDataSource(JoinedList <T> lists, int[] dimensions) : base(lists, dimensions) { if (Shape.Rank == 1) { _stride = 1; } else { _stride = Shape.GetSize(-2); } }
/// <summary> /// DataBind the template grid view /// </summary> private void BindGrdTemplates() { var AttributeSetList = Sexy.GetAvailableAttributeSets(SexyContent.AttributeSetScope).ToList(); var TemplateList = Sexy.GetTemplates(PortalId).ToList(); var Templates = from c in TemplateList join a in AttributeSetList on c.AttributeSetID equals a.AttributeSetId into JoinedList from a in JoinedList.DefaultIfEmpty() select new { TemplateID = c.TemplateID, TemplateName = c.Name, AttributeSetID = c.AttributeSetID, AttributeSetName = a != null ? a.Name : "No Content Type", TemplatePath = c.Path, DemoEntityID = c.DemoEntityID, IsHidden = c.IsHidden }; grdTemplates.DataSource = Templates; grdTemplates.DataBind(); }