/// <summary> /// sets the initial data for an application /// </summary> /// <param name="variables">All variables needed to run the application.</param> public void ConfigureApplication(ApplicationVariable[] variables) { try { ApplicationParsedData parsedData = PluginHelper.GetParsedData(variables); this.startupLogger = new FileLogger(parsedData.StartupLogFilePath); this.appName = RemoveSpecialCharacters(parsedData.AppInfo.Name) + parsedData.AppInfo.Port.ToString(CultureInfo.InvariantCulture); this.appPath = parsedData.AppInfo.Path; this.applicationInfo = parsedData.AppInfo; this.autoWireTemplates = parsedData.AutoWireTemplates; this.aspDotNetVersion = this.GetAppVersion(this.applicationInfo); this.AutowireApp(parsedData.AppInfo, variables, parsedData.GetServices(), parsedData.LogFilePath, parsedData.ErrorLogFilePath); this.cpuTarget = this.GetCpuTarget(this.applicationInfo); } catch (Exception ex) { this.startupLogger.Error(ex.ToString()); throw; } }
/// <summary> /// recovers a running application /// </summary> /// <param name="variables">All variables needed to run the application.</param> public void RecoverApplication(ApplicationVariable[] variables) { try { ApplicationParsedData parsedData = PluginHelper.GetParsedData(variables); this.startupLogger = new FileLogger(parsedData.StartupLogFilePath); this.appName = RemoveSpecialCharacters(parsedData.AppInfo.Name) + parsedData.AppInfo.Port.ToString(CultureInfo.InvariantCulture); this.appPath = parsedData.AppInfo.Path; this.applicationInfo = parsedData.AppInfo; this.autoWireTemplates = parsedData.AutoWireTemplates; } catch (Exception ex) { this.startupLogger.Error(ex.ToString()); throw; } }