Пример #1
0
        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);
        }
Пример #2
0
 public void Compose(InstallerBuilder installerBuilder)
 {
     foreach (var prompt in _prompts.Where(p => p.ShouldPrompt(installerBuilder)))
     {
         prompt.Invoke(installerBuilder);
     }
 }
Пример #3
0
        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);
            }
        }
Пример #4
0
        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");
        }
Пример #5
0
 public bool ShouldPrompt(InstallerBuilder installerBuilder)
 {
     return(!installerBuilder.MinWindowsVersion.HasConfidence(Confidence.Authoritative));
 }
Пример #6
0
 public bool ShouldPrompt(InstallerBuilder installerBuilder)
 {
     return(!installerBuilder.Architecture.HasConfidence(Confidence.Authoritative));
 }
Пример #7
0
 public static Uri Uri(this InstallerBuilder installer)
 {
     return(new Uri(installer.Location));
 }