예제 #1
0
        public static void Bootstrap(TemplatesSource source, GenShell shell, Version wizardVersion, string language)
        {
            try
            {
                AppHealth.Current.AddWriter(new ShellHealthWriter(shell));
                AppHealth.Current.Info.TrackAsync($"{StringRes.ConfigurationFileLoadedString}: {Configuration.LoadedConfigFile}").FireAndForget();

                string hostVersion = $"{shell.GetVsVersionAndInstance()}-{wizardVersion.Major}.{wizardVersion.Minor}";

                CodeGen.Initialize(source.Id, hostVersion);
                var repository = new TemplatesRepository(source, wizardVersion, language);

                ToolBox = new GenToolBox(repository, shell);

                PurgeTempGenerations(Configuration.Current.DaysToKeepTempGenerations);

                CodeGen.Initialize(source.Id, hostVersion);

                CurrentLanguage = language;
            }
            catch (Exception ex)
            {
                AppHealth.Current.Exception.TrackAsync(ex, StringRes.GenContextBootstrapError).FireAndForget();
                Trace.TraceError($"{StringRes.GenContextBootstrapError} Exception:\n\r{ex}");
                throw;
            }
        }
예제 #2
0
        public static void Bootstrap(TemplatesSource source, GenShell shell, Version wizardVersion)
        {
            AppHealth.Current.AddWriter(new ShellHealthWriter());
            AppHealth.Current.Info.TrackAsync($"Configuration file loaded: {Configuration.LoadedConfigFile}").FireAndForget();

            string hostVersion = $"{wizardVersion.Major}.{wizardVersion.Minor}";

            CodeGen.Initialize(source.Id, hostVersion);
            TemplatesRepository repository = new TemplatesRepository(source, wizardVersion);

            ToolBox = new GenToolBox(repository, shell);

            IsInitialized = true;
        }
예제 #3
0
 public static void Bootstrap(TemplatesSource source, GenShell shell, string platform, string language)
 {
     Bootstrap(source, shell, GetWizardVersionFromAssembly(), platform, language);
 }
예제 #4
0
 public static void Bootstrap(TemplatesSource source, GenShell shell)
 {
     Bootstrap(source, shell, GetWizardVersionFromAssembly());
 }