MonoMobile.Views.ViewSource.RowsInSection C# (CSharp) Method

RowsInSection() public method

public RowsInSection ( UITableView tableview, int sectionIndex ) : int
tableview UITableView
sectionIndex int
return int
		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;
		}