private ContextInfo GetContextInfo(List<PanelSetting> pathsPanelSettings, List<PanelSetting> generalPanelSettings, int contextIndex) { ContextInfo info = new ContextInfo { ContextIndex = contextIndex }; if (pathsPanelSettings[3].PanelSettingName.Equals("OpenPortalLiveBaseUrl")) { info.OpenPortalLiveBaseUrl = pathsPanelSettings[3].Value; } else { throw new Exception("OpenPortalLiveBaseUrl not found at Index 3 of Paths Panel Settings"); } if (pathsPanelSettings[5].PanelSettingName.Equals("OpenPortalTestBaseUrl")) { info.OpenPortalTestBaseUrl = pathsPanelSettings[5].Value; } else { throw new Exception("OpenPortalTestBaseUrl not found at index 5 of Paths Panel Settings"); } // Added for Available context module by Optimus if (pathsPanelSettings[6].PanelSettingName.Equals("PortalBaseUrl")) { info.PortalBaseUrl = pathsPanelSettings[6].Value; } else { throw new Exception("PortalBaseUrl not found at index 5 of Paths Panel Settings"); } //General if (generalPanelSettings[0].PanelSettingName.Equals("Culture")) { info.Culture = generalPanelSettings[0].Value; } if (generalPanelSettings[2].PanelSettingName.Equals("Environment")) { info.Environment = generalPanelSettings[2].Value; } // Added for Available context module by Optimus if (generalPanelSettings[5].PanelSettingName.Equals("Name")) { info.Name = generalPanelSettings[5].Value; } return info; }
private ContextInfo GetContextInfo(List<PanelSetting> pathsPanelSettings, List<PanelSetting> generalPanelSettings, int contextIndex) { ContextInfo info = new ContextInfo {ContextIndex = contextIndex}; if (pathsPanelSettings[3].PanelSettingName.Equals("OpenPortalLiveBaseUrl")) { info.OpenPortalLiveBaseUrl = pathsPanelSettings[3].Value; } else { throw new Exception("OpenPortalLiveBaseUrl not found at Index 3 of Paths Panel Settings"); } if (pathsPanelSettings[5].PanelSettingName.Equals("OpenPortalTestBaseUrl")) { info.OpenPortalTestBaseUrl = pathsPanelSettings[5].Value; } else { throw new Exception("OpenPortalTestBaseUrl not found at index 5 of Paths Panel Settings"); } info.SubDomain = ParseSubDomain(info.OpenPortalLiveBaseUrl); //General if(generalPanelSettings[0].PanelSettingName.Equals("Culture")) { info.Culture = generalPanelSettings[0].Value; } if (generalPanelSettings[2].PanelSettingName.Equals("Environment")) { info.Environment = generalPanelSettings[2].Value; } return info; }
private ContextInfo GetContextInfo(List<PanelSetting> pathsPanelSettings, List<PanelSetting> generalPanelSettings, int contextIndex) { ContextInfo info = new ContextInfo { ContextIndex = contextIndex }; info.OpenPortalLiveBaseUrl = readSetting(pathsPanelSettings, "OpenPortalLiveBaseUrl", true); info.OpenPortalTestBaseUrl = readSetting(pathsPanelSettings, "OpenPortalTestBaseUrl", true); info.PortalBaseUrl = readSetting(pathsPanelSettings, "PortalBaseUrl", true); info.OpenPortalSkinFolder = readSetting(pathsPanelSettings, "OpenPortalSkinFolder", false); //General Settings if (generalPanelSettings[0].PanelSettingName.Equals("Culture")) { info.Culture = generalPanelSettings[0].Value; } if (generalPanelSettings[2].PanelSettingName.Equals("Environment")) { info.Environment = generalPanelSettings[2].Value; } // Added for Available context module by Optimus if (generalPanelSettings[5].PanelSettingName.Equals("Name")) { info.Name = generalPanelSettings[5].Value; } return info; }