public override object GetData(ITabContext context) { var plugin = Plugin.Create("Function", "Param", "Type"); try { string url = System.Web.HttpContext.Current.Request.Url.AbsoluteUri; int NodeId = -1; if (!string.IsNullOrEmpty(System.Web.HttpContext.Current.Request["glimpse7GetMediaById"])) { Int32.TryParse(System.Web.HttpContext.Current.Request["glimpse7GetMediaById"], out NodeId); } if (NodeId > 0) { dynamic mediaItem = new DynamicMedia(NodeId); return(UmbracoFn.showMethodsValue(mediaItem, "media")); } else { return(UmbracoFn.showMethods(typeof(DynamicMedia))); } } catch (Exception ex) { plugin.AddRow().Column(ex.ToString()); } return(plugin); }
public override object GetData(ITabContext context) { var plugin = Plugin.Create("#", "Function", "Param"); List <Type[]> typeList = new List <Type[]>(); try { var types = from assembly in AppDomain.CurrentDomain.GetAssemblies() from type in assembly.GetTypes() where type.IsSubclassOf(typeof(System.Web.WebPages.HelperPage)) select type; foreach (var type in types) { if (type.Name != "WebGridRenderer") { foreach (var item in UmbracoFn.showMethodsList(type).Where(t => t.TypeName == "System.Web.WebPages.HelperResult")) { plugin.AddRow().Column("@" + type.Name).Column(item.FunctionName).Column(item.param); } } } return(plugin); } catch (Exception ex) { plugin.AddRow().Column(ex.ToString()); } return(plugin); }
public override object GetData(ITabContext context) { var plugin = Plugin.Create("Function", "Param", "Type"); try { string url = System.Web.HttpContext.Current.Request.Url.AbsoluteUri; int NodeId = 0; if (System.Web.HttpContext.Current.Request["glimpse7GetCheatSheet"] == "true") { return(UmbracoFn.showMethods(typeof(DynamicPublishedContent))); } if (!string.IsNullOrEmpty(System.Web.HttpContext.Current.Request["glimpse7GetContentById"])) { Int32.TryParse(System.Web.HttpContext.Current.Request["glimpse7GetContentById"], out NodeId); } else if (umbraco.presentation.UmbracoContext.Current.PageId != null) { NodeId = umbraco.presentation.UmbracoContext.Current.PageId.Value; } else { return(UmbracoFn.showMethodsValue(typeof(DynamicPublishedContent), "content")); } var umbracoHelper = new UmbracoHelper(UmbracoContext.Current); IPublishedContent content = umbracoHelper.TypedContent(NodeId); var node = new Umbraco.Web.Models.DynamicPublishedContent(content); return(UmbracoFn.showMethodsValue(node, "content")); } catch (Exception ex) { plugin.AddRow().Column(umbraco.presentation.UmbracoContext.Current.PageId); } return(plugin); }