internal NodeTypeTreeNode(FormDataCollection queryStrings) : base("nodeType-" + queryStrings["searcherName"] + "|" + queryStrings["nodeType"], queryStrings) { this.SearcherName = queryStrings["searcherName"]; this.NodeType = (PublishedItemType)Enum.Parse(typeof(PublishedItemType), queryStrings["nodeType"], true); this.Icon = IconService.GetNodeTypeIcon(this.NodeType); this.Name = this.NodeType == PublishedItemType.Content ? "Content" : this.NodeType == PublishedItemType.Media ? "Media" : this.NodeType == PublishedItemType.Member ? "Members" : null; }
public IHttpActionResult GetViewDataForNodeType([FromUri] string searcherName, [FromUri] PublishedItemType nodeType) { var viewData = new NodeTypeViewData(); viewData.Name = nodeType == PublishedItemType.Content ? "Content" : nodeType == PublishedItemType.Media ? "Media" : nodeType == PublishedItemType.Member ? "Members" : null; viewData.Icon = IconService.GetNodeTypeIcon(nodeType); return(this.Ok(viewData)); }