예제 #1
0
        public static GitHubUpgrader Create(
            ITracer tracer,
            PhysicalFileSystem fileSystem,
            bool dryRun,
            bool noVerify,
            LocalGVFSConfig localConfig,
            out string error)
        {
            GitHubUpgrader       upgrader             = null;
            GitHubUpgraderConfig gitHubUpgraderConfig = new GitHubUpgraderConfig(tracer, localConfig);

            if (!gitHubUpgraderConfig.TryLoad(out error))
            {
                return(null);
            }

            if (gitHubUpgraderConfig.ConfigError())
            {
                gitHubUpgraderConfig.ConfigAlertMessage(out error);
                return(null);
            }

            upgrader = new GitHubUpgrader(
                ProcessHelper.GetCurrentProcessVersion(),
                tracer,
                fileSystem,
                gitHubUpgraderConfig,
                dryRun,
                noVerify);

            return(upgrader);
        }
예제 #2
0
 public GitHubUpgrader(
     string currentVersion,
     ITracer tracer,
     GitHubUpgraderConfig upgraderConfig)
     : this(currentVersion, tracer)
 {
     this.Config = upgraderConfig;
 }
 public MockGitHubUpgrader(
     string currentVersion,
     ITracer tracer,
     GitHubUpgraderConfig config) : base(currentVersion, tracer, config)
 {
     this.DownloadedFiles = new List <string>();
     this.InstallerArgs   = new Dictionary <string, Dictionary <string, string> >();
 }
예제 #4
0
 public GitHubUpgrader(
     string currentVersion,
     ITracer tracer,
     PhysicalFileSystem fileSystem,
     GitHubUpgraderConfig upgraderConfig,
     bool dryRun   = false,
     bool noVerify = false)
     : base(currentVersion, tracer, dryRun, noVerify, fileSystem)
 {
     this.Config = upgraderConfig;
 }
예제 #5
0
 public GitHubUpgrader(
     string currentVersion,
     ITracer tracer,
     GitHubUpgraderConfig upgraderConfig,
     bool dryRun   = false,
     bool noVerify = false)
     : this(currentVersion, tracer)
 {
     this.Config   = upgraderConfig;
     this.dryRun   = dryRun;
     this.noVerify = noVerify;
 }
예제 #6
0
        public GitHubUpgrader(
            string currentVersion,
            ITracer tracer,
            PhysicalFileSystem fileSystem,
            GitHubUpgraderConfig upgraderConfig,
            bool dryRun   = false,
            bool noVerify = false)
            : base(currentVersion, tracer, dryRun, noVerify, fileSystem)
        {
            this.Config = upgraderConfig;

            string upgradesDirectoryPath = ProductUpgraderInfo.GetUpgradesDirectoryPath();

            this.fileSystem.CreateDirectory(upgradesDirectoryPath);
        }
예제 #7
0
        public static GitHubUpgrader Create(LocalGVFSConfig localConfig, ITracer tracer, out string error)
        {
            GitHubUpgrader       upgrader             = null;
            GitHubUpgraderConfig gitHubUpgraderConfig = new GitHubUpgraderConfig(tracer, localConfig);

            if (!gitHubUpgraderConfig.TryLoad(out error))
            {
                return(null);
            }

            if (gitHubUpgraderConfig.ConfigError())
            {
                gitHubUpgraderConfig.ConfigAlertMessage(out error);
                return(null);
            }

            upgrader = new GitHubUpgrader(
                ProcessHelper.GetCurrentProcessVersion(),
                tracer,
                gitHubUpgraderConfig);

            return(upgrader);
        }