diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/developer/autoDoc.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/developer/autoDoc.aspx.cs index 352b4c7ca6..3484a4504e 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/developer/autoDoc.aspx.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/developer/autoDoc.aspx.cs @@ -9,6 +9,7 @@ using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.HtmlControls; using System.Linq; +using umbraco.BusinessLogic; namespace umbraco.developer { @@ -17,56 +18,40 @@ namespace umbraco.developer /// public partial class autoDoc : BasePages.UmbracoEnsuredPage { - - protected void Page_Load(object sender, System.EventArgs e) + public autoDoc() + { + CurrentApp = DefaultApps.developer.ToString(); + } + + protected void Page_Load(object sender, EventArgs e) { // Put user code to initialize the page here - foreach(cms.businesslogic.web.DocumentType dt in cms.businesslogic.web.DocumentType.GetAllAsList()) + foreach(var dt in cms.businesslogic.web.DocumentType.GetAllAsList()) { LabelDoc.Text += "
" + dt.Text + "
Id: " + dt.Id.ToString() + ", Alias: " + dt.Alias + ")
"; if (dt.PropertyTypes.Count > 0) LabelDoc.Text += "Property Types:
"; - foreach (cms.businesslogic.propertytype.PropertyType pt in dt.PropertyTypes) + foreach (var pt in dt.PropertyTypes) LabelDoc.Text += "" + pt.Id.ToString() + ", " + pt.Alias + ", " + pt.Name + "
"; if (dt.getVirtualTabs.Length > 0) LabelDoc.Text += "Tabs:
"; - foreach (cms.businesslogic.ContentType.TabI t in dt.getVirtualTabs.ToList()) + foreach (var t in dt.getVirtualTabs.ToList()) LabelDoc.Text += "" + t.Id.ToString() + ", " + t.Caption + "
"; if (dt.AllowedChildContentTypeIDs.Length > 0) LabelDoc.Text += "Allowed children:
"; - foreach (int child in dt.AllowedChildContentTypeIDs.ToList()) + foreach (var child in dt.AllowedChildContentTypeIDs.ToList()) { - cms.businesslogic.ContentType _child = new cms.businesslogic.ContentType(child); + var contentType = new cms.businesslogic.ContentType(child); LabelDoc.Text += - "" + _child.Id.ToString() + ", " + _child.Text + "
"; + "" + contentType.Id.ToString() + ", " + contentType.Text + "
"; } LabelDoc.Text += "