MonoTouch.Dialog.JsonElement.LoadSections C# (CSharp) Method

LoadSections() private method

private LoadSections ( JsonArray array, object data ) : void
array JsonArray
data object
return void
		void LoadSections (JsonArray array, object data)
		{
			if (array == null)
				return;
			int n = array.Count;
			for (int i = 0; i < n; i++){
				var jsonSection = array [i];
				var header = GetString (jsonSection, "header");
				var footer = GetString (jsonSection, "footer");
				var id = GetString (jsonSection, "id");

				var section = new Section (header, footer);
				if (jsonSection.ContainsKey ("elements"))
					LoadSectionElements (section, jsonSection ["elements"] as JsonArray, data);
				Add (section);
				if (id != null)
					AddMapping (id, section);
			}
		}