MonoMobile.Views.HttpDebug.Summary C# (CSharp) Method

Summary() static private method

static private Summary ( TextWriter c ) : void
c System.IO.TextWriter
return void
		static void Summary(TextWriter c)
		{
			Header(c, "Summary", "$(\"a.type\").click (function (e) { $(this).append ('<div></div>'); $(this).children ().load ('/type/'); console.log ($(this).contents ()); e.preventDefault ();});");
			//Header (c, "Summary", "alert ('loaded');");
			var weakList = MonoTouch.ObjCRuntime.Runtime.GetSurfacedObjects();
			c.WriteLine("<div id='foo'></div>");
			c.WriteLine("<p>Total surfaced objects: {0}", weakList.Count);
			var groups = from weak in weakList
				let nso =  weak.Target
				where nso != null
				let typeName = nso.GetType().FullName
				orderby typeName
				group nso by typeName into g
				let gCount = g.ToList().Count
				orderby gCount descending
				select new { Type = g.Key, Instances = g };
			var list = groups.ToList();
			c.WriteLine("<p>Have {0} different types surfaced", list.Count);
			c.WriteLine("<ul>");
			foreach (var type in list)
			{
				c.WriteLine("<li>{1} <a href='' class='type'>{0}</a>", type.Type, type.Instances.ToList().Count);
			}
			c.WriteLine("</ul>");
			c.WriteLine("</body></html>");
		}