CCNet.Build.Reconfigure.PageBuilder.UpdateAreaPage C# (CSharp) Method

UpdateAreaPage() private method

private UpdateAreaPage ( IEnumerable pages, PageSummary area ) : bool
pages IEnumerable
area CCNet.Build.Confluence.PageSummary
return bool
		private bool UpdateAreaPage(IEnumerable<IProjectPage> pages, PageSummary area)
		{
			var updated = new PageDocument();

			var tbody = new XElement(
				"tbody",
				new XElement(
					"tr",
					new XElement("th", "Project"),
					new XElement("th", ".NET"),
					new XElement("th", "Owner"),
					new XElement("th", "Status")));

			foreach (var page in pages.OrderBy(p => p.OrderKey))
			{
				tbody.Add(page.RenderSummaryRow(true));
			}

			updated.Root.Add(
				new XElement(
					"table",
					tbody));

			var content = updated.Render();
			var existing = m_confluence.GetCachedPage(area);

			var before = NormalizeForComparison(existing.Content);
			var after = NormalizeForComparison(content);

			if (after == before)
				return false;

			existing.Content = content;
			m_confluence.UpdatePage(existing);
			return true;
		}