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; } }
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; }
public static void Bootstrap(TemplatesSource source, GenShell shell, string platform, string language) { Bootstrap(source, shell, GetWizardVersionFromAssembly(), platform, language); }
public static void Bootstrap(TemplatesSource source, GenShell shell) { Bootstrap(source, shell, GetWizardVersionFromAssembly()); }