public override int RowsInSection(UITableView tableview, int sectionIndex)
{
if (IsRootCell)
{
return 1;
}
var listCount = 0;
var numberOfRows = 0;
if (Sections != null && Sections.ContainsKey(sectionIndex))
{
var listSource = Sections[sectionIndex].ListSources[0];
if (listSource != null)
{
listCount = listSource.RowsInSection(tableview, 0) - 1;
}
numberOfRows = Sections[sectionIndex].DataContext.Count;
}
return Sections != null ? numberOfRows + listCount: 0;
}