Ejemplo n.º 1
0
        /// <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;
            }
        }
Ejemplo n.º 2
0
 /// <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;
     }
 }