public override object GetData(ITabContext context) { try { var sitecoreData = _sitecoreRequest.GetData(); if (!sitecoreData.HasData()) return null; var itemSummary = new ItemSummary(sitecoreData).Create(); if (string.IsNullOrEmpty(itemSummary)) return null; var plugin = Plugin.Create("Item", itemSummary); var itemSection = new ItemSection(sitecoreData).Create(); var contextSection = new ContextSection(sitecoreData).Create(); var serverSection = new ServerSection(sitecoreData).Create(); if (itemSection != null) plugin.AddRow().Column("Item").Column(itemSection).Selected(); if (contextSection != null) plugin.AddRow().Column("Context").Column(contextSection).Quiet(); if (serverSection != null) plugin.AddRow().Column("Server").Column(serverSection); return plugin; } catch (Exception ex) { return new { Exception = ex }; } }
public override object GetData(ITabContext context) { try { var sitecoreData = _sitecoreRequest.GetData(); if (!sitecoreData.HasData()) { return(null); } var itemSummary = new ItemSummary(sitecoreData).Create(); if (string.IsNullOrEmpty(itemSummary)) { return(null); } var plugin = Plugin.Create("Item", itemSummary); var itemSection = new ItemSection(sitecoreData).Create(); var contextSection = new ContextSection(sitecoreData).Create(); var serverSection = new ServerSection(sitecoreData).Create(); if (itemSection != null) { plugin.AddRow().Column("Item").Column(itemSection).Selected(); } if (contextSection != null) { plugin.AddRow().Column("Context").Column(contextSection).Quiet(); } if (serverSection != null) { plugin.AddRow().Column("Server").Column(serverSection).Quiet(); } return(plugin); } catch (Exception ex) { return(new { Exception = ex }); } }