private static string BuildBaseUrl(AppAlias app) { var appName = app.GetDescription(); var environment = GatekeeperSettingManager.GetAppsetting(SettingName.ENVIRONMENT); //var churchCode = GatekeeperSettingManager.GetAppsetting(SettingName.CHURCHCODE); var baseUrl = string.Empty; if (app == AppAlias.Membership_AUI) { baseUrl = string.Format("https://memberui-vip.{0}.aw.dev.activenetwork.com", environment); } //if (environment == "proc") //{ // if (app != AppAlias.Unkonw) // { // baseUrl = string.Format("https://{0}.fellowshipone.com", appName); // } //} //else //{ // if (app != AppAlias.Unkonw) // { // baseUrl = string.Format("https://{0}.{1}.fellowshipone.com", appName, environment); // } //} return baseUrl.ToLower(); }
private static string BuildBaseUrl(AppAlias app) { var appName = app.GetDescription(); var environment = GatekeeperSettingManager.GetAppsetting(SettingName.ENVIRONMENT); //var churchCode = GatekeeperSettingManager.GetAppsetting(SettingName.CHURCHCODE); var baseUrl = string.Empty; if (app == AppAlias.Membership_AUI) { baseUrl = string.Format("https://memberui-vip.{0}.aw.dev.activenetwork.com", environment); } //if (environment == "proc") //{ // if (app != AppAlias.Unkonw) // { // baseUrl = string.Format("https://{0}.fellowshipone.com", appName); // } //} //else //{ // if (app != AppAlias.Unkonw) // { // baseUrl = string.Format("https://{0}.{1}.fellowshipone.com", appName, environment); // } //} return(baseUrl.ToLower()); }
/// <summary> /// Creates a new alias. /// </summary> /// <param name="aliasName">The name of the alias to create.</param> /// <param name="interfaceUri">The interface URI the alias shall point to.</param> /// <param name="command">A command within the interface the alias shall point to; can be <c>null</c>.</param> /// <returns>The exit status code to end the process with.</returns> private ExitCode CreateAlias(string aliasName, FeedUri interfaceUri, string command = null) { CheckInstallBase(); using (var integrationManager = new IntegrationManager(Handler, MachineWide)) { // Check this before modifying the environment bool needsReopenTerminal = NeedsReopenTerminal(integrationManager.MachineWide); var appEntry = GetAppEntry(integrationManager, ref interfaceUri); // Apply the new alias var alias = new AppAlias { Name = aliasName, Command = command }; integrationManager.AddAccessPoints(appEntry, FeedManager[interfaceUri], new AccessPoint[] { alias }); string message = string.Format(Resources.AliasCreated, aliasName, appEntry.Name); if (needsReopenTerminal) { message += Environment.NewLine + Resources.ReopenTerminal; } Handler.OutputLow(Resources.DesktopIntegration, message); return(ExitCode.OK); } }
/// <summary> /// Creates a new alias. /// </summary> /// <param name="appEntry">The app entry to add the alias to.</param> /// <param name="aliasName">The name of the alias to create.</param> /// <param name="command">A command within the interface the alias shall point to; can be <c>null</c>.</param> protected void CreateAlias(AppEntry appEntry, string aliasName, string?command = null) { #region Sanity checks if (appEntry == null) { throw new ArgumentNullException(nameof(appEntry)); } if (string.IsNullOrEmpty(aliasName)) { throw new ArgumentNullException(nameof(aliasName)); } #endregion CheckInstallBase(); // Check this before modifying the environment bool needsReopenTerminal = NeedsReopenTerminal(MachineWide); // Apply the new alias var alias = new AppAlias { Name = aliasName, Command = command }; IntegrationManager.AddAccessPoints(appEntry, FeedManager[InterfaceUri], new AccessPoint[] { alias }); string message = string.Format(Resources.AliasCreated, aliasName, appEntry.Name); if (needsReopenTerminal) { message += Environment.NewLine + Resources.ReopenTerminal; } Handler.OutputLow(Resources.DesktopIntegration, message); }
public void TestFindAppAlias() { var appAlias = new AppAlias { Name = "foobar" }; var appEntry = new AppEntry { AccessPoints = new AccessPointList { Entries = { appAlias } } }; var appList = new AppList { Entries = { appEntry } }; appList.FindAppAlias("foobar").Should().Be((appAlias, appEntry)); appList.FindAppAlias("other").Should().BeNull(); }
/// <summary> /// Creates a new alias. /// </summary> /// <param name="aliasName">The name of the alias to create.</param> /// <param name="interfaceUri">The interface URI the alias shall point to.</param> /// <param name="command">A command within the interface the alias shall point to; can be <c>null</c>.</param> /// <returns>The exit status code to end the process with.</returns> private ExitCode CreateAlias(string aliasName, FeedUri interfaceUri, string command = null) { CheckInstallBase(); using (var integrationManager = new IntegrationManager(Handler, MachineWide)) { // Check this before modifying the environment bool needsReopenTerminal = NeedsReopenTerminal(integrationManager.MachineWide); var appEntry = GetAppEntry(integrationManager, ref interfaceUri); // Apply the new alias var alias = new AppAlias {Name = aliasName, Command = command}; integrationManager.AddAccessPoints(appEntry, FeedManager[interfaceUri], new AccessPoint[] {alias}); string message = string.Format(Resources.AliasCreated, aliasName, appEntry.Name); if (needsReopenTerminal) message += Environment.NewLine + Resources.ReopenTerminal; Handler.OutputLow(Resources.DesktopIntegration, message); return ExitCode.OK; } }
public RouteInfomationAttribute(AppAlias app) { this.AppAlias = app; }