private IAppUpdater GetAppUpdaterInstance(UpdaterSetting setting)
        {
            var appUpdateDetail = new AppUpdateDetail(setting.Location, RuntimeHelper.ExecutionLocation, new[] { RuntimeHelper.ExecutionAssemblyName });

            switch (setting.Name)
            {
            case "AppUpdater.VNCAppUpdater":
                return(new VNCAppUpdater(appUpdateDetail, new LocalFileGateway()));

            case "AppUpdater.GitHubAppUpdater":
                return(new GitHubAppUpdater(new GitHub(new HttpEngine()), appUpdateDetail));

            default:
                throw new Exception("Not able to create updater for :" + setting.Name);
            }
        }
 public GitHubAppUpdater(IGitHub gitHub, AppUpdateDetail appUpdateDetail)
 {
     _appUpdateDetail = appUpdateDetail;
     _gitHub          = gitHub;
 }
Esempio n. 3
0
 public VNCAppUpdater(AppUpdateDetail appUpdateDetail, IFileGateway file)
 {
     AppUpdateDetail = appUpdateDetail;
     _fileGateway    = file;
 }