public void Invoke(InstallerBuilder installer) { var prompt = new EnumPrompt <ArchitectureTypes>(); var value = prompt.Request("Architecture", installer.Architecture.Value); installer.Architecture.Add(value, Confidence.Authoritative, this); }
public void Compose(InstallerBuilder installerBuilder) { foreach (var prompt in _prompts.Where(p => p.ShouldPrompt(installerBuilder))) { prompt.Invoke(installerBuilder); } }
public void Invoke(InstallerBuilder installerBuilder) { var minWindowsVersion = _prompt.Request("Minimum Windows Version", WindowsVersion.KnownVersions.First()); if (minWindowsVersion != new Version(0, 0)) { installerBuilder.MinWindowsVersion.Add(minWindowsVersion, Confidence.Authoritative, this); } }
public void get_non_github_hostname_as_url() { var installer = new InstallerBuilder { Location = "https://microsoft.com/office" }; var man = new PackageManifestBuilder(); man.Installers.Add(installer); Subject.Invoke(man); man.Home.Value.Should().Be("https://microsoft.com"); }
public bool ShouldPrompt(InstallerBuilder installerBuilder) { return(!installerBuilder.MinWindowsVersion.HasConfidence(Confidence.Authoritative)); }
public bool ShouldPrompt(InstallerBuilder installerBuilder) { return(!installerBuilder.Architecture.HasConfidence(Confidence.Authoritative)); }
public static Uri Uri(this InstallerBuilder installer) { return(new Uri(installer.Location)); }