本文整理汇总了C#中DotNetNuke.Entities.Portals.PortalAliasController.ToArray方法的典型用法代码示例。如果您正苦于以下问题:C# PortalAliasController.ToArray方法的具体用法?C# PortalAliasController.ToArray怎么用?C# PortalAliasController.ToArray使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DotNetNuke.Entities.Portals.PortalAliasController
的用法示例。
在下文中一共展示了PortalAliasController.ToArray方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetData
/// <summary>
/// Gets the data to send to the Glimpse client.
/// </summary>
/// <param name="context">The context.</param>
/// <returns>Data to send the the Glimpse client.</returns>
public object GetData(HttpContextBase context)
{
try
{
// get variables we'll need to output
var portalSettings = PortalSettings.Current;
var tabCreatedByUser = UserController.GetUserById(-1, portalSettings.ActiveTab.CreatedByUserID);
var tabModifiedByUser = UserController.GetUserById(-1, portalSettings.ActiveTab.LastModifiedByUserID);
var portalAliases = new PortalAliasController().GetPortalAliasArrayByPortalID(portalSettings.PortalId)
.Cast<PortalAliasInfo>()
.Select(p => p.HTTPAlias);
var contextItems = new List<object[]> { new object[] { "Key", "Value" } };
foreach (var itemKey in context.Items.Keys)
contextItems.Add(new object[] { itemKey.ToString(), context.Items[itemKey].ToString() });
// add to data to send
var data = new List<object[]> { new object[] { "Property", "Value" } };
data.Add(new object[] { "PortalID", portalSettings.PortalId });
data.Add(new object[] { "Portal Name", portalSettings.PortalName });
data.Add(new object[] { "Portal Aliases", portalAliases.ToArray() });
data.Add(new object[] { "Portal SSL Enabled", portalSettings.SSLEnabled });
data.Add(new object[] { "Portal SSL Enforced", portalSettings.SSLEnforced });
data.Add(new object[] { "User ID", portalSettings.UserId });
data.Add(new object[] { "User Name", portalSettings.UserInfo.Username });
data.Add(new object[] { "User Roles", portalSettings.UserInfo.Roles });
data.Add(new object[] { "Tab ID", portalSettings.ActiveTab.TabID });
data.Add(new object[] { "Tab Name", portalSettings.ActiveTab.TabName });
data.Add(new object[] { "Tab Title", portalSettings.ActiveTab.Title });
data.Add(new object[] { "Tab Path", portalSettings.ActiveTab.TabPath });
data.Add(new object[] { "Tab SSL Enabled", portalSettings.ActiveTab.IsSecure });
data.Add(new object[] { "Tab Created By", (tabCreatedByUser == null) ? null : tabCreatedByUser.Username });
data.Add(new object[] { "Tab Created Date", portalSettings.ActiveTab.CreatedOnDate });
data.Add(new object[] { "Tab Modified By", (tabModifiedByUser == null) ? null : tabModifiedByUser.Username });
data.Add(new object[] { "Tab Modified Date", portalSettings.ActiveTab.LastModifiedOnDate });
data.Add(new object[] { "Tab Skin Path", portalSettings.ActiveTab.SkinPath });
data.Add(new object[] { "Tab Skin Source", portalSettings.ActiveTab.SkinSrc });
data.Add(new object[] { "Context Items", contextItems });
return data;
}
catch (Exception ex)
{
DotNetNuke.Services.Exceptions.Exceptions.LogException(ex);
return null;
}
}