예제 #1
0
 /// <summary>
 /// recovers a running application
 /// </summary>
 /// <param name="variables">All variables needed to run the application.</param>
 public void RecoverApplication(ApplicationVariable[] variables)
 {
     try
     {
         this.parsedData = PluginHelper.GetParsedData(variables);
         this.startupLogger = new FileLogger(this.parsedData.StartupLogFilePath);
         this.appName = RemoveSpecialCharacters(this.parsedData.AppInfo.Name) + this.parsedData.AppInfo.Port.ToString(CultureInfo.InvariantCulture);
         this.appPath = this.parsedData.AppInfo.Path;
         this.applicationInfo = this.parsedData.AppInfo;
         this.autoWireTemplates = this.parsedData.AutoWireTemplates;
     }
     catch (Exception ex)
     {
         this.startupLogger.Error(ex.ToString());
         throw;
     }
 }
예제 #2
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
            {
                this.parsedData = PluginHelper.GetParsedData(variables);
                this.startupLogger = new FileLogger(this.parsedData.StartupLogFilePath);

                this.appName = RemoveSpecialCharacters(this.parsedData.AppInfo.Name) + this.parsedData.AppInfo.Port.ToString(CultureInfo.InvariantCulture);
                this.appPath = this.parsedData.AppInfo.Path;

                this.applicationInfo = this.parsedData.AppInfo;

                this.autoWireTemplates = this.parsedData.AutoWireTemplates;

                this.aspDotNetVersion = this.GetAppVersion(this.applicationInfo);

                this.cpuTarget = this.GetCpuTarget(this.applicationInfo);

                this.AutowireApp(this.parsedData.AppInfo, variables, this.parsedData.GetServices(), this.parsedData.LogFilePath, this.parsedData.ErrorLogFilePath);
                this.AutowireUhurufs(this.parsedData.AppInfo, variables, this.parsedData.GetServices(), this.parsedData.HomeAppPath);
            }
            catch (Exception ex)
            {
                this.startupLogger.Error(ex.ToString());
                throw;
            }
        }