public BootStrapperManager(ILogger logger, IPackageDownloader downloader, IPackageRunner runner, IPackageUnzipper unzipper, IPackageUploader uploader = null, IPackageZipper zipper = null)
 {
     this.downloader = downloader;
     this.runner = runner;
     this.unzipper = unzipper;
     this.uploader = uploader;
     this.zipper = zipper;
 }
示例#2
0
 public D8PackageUploaderFacts()
 {
     _creds = UploaderConfigFile.Parse(UploaderCfg.Localhost);
     using (var scope = UploaderIoC.BeginScope())
     {
         _client = scope.Resolve <IR2RestClient>();
         _sut    = scope.Resolve <IPackageUploader>();
         _parts  = scope.Resolve <IPackagePartManager>();
         _pkgs   = scope.Resolve <IRemotePackageManager>();
     }
 }
示例#3
0
        public PackageUploaderVM(IPackageUploader packageUploader)
        {
            _pkgUploadr = packageUploader;

            _pkgUploadr.StatusChanged += (s, statusText)
                                         => UploaderStatus = statusText;

            PropertyChanged += (s, e)
                               => CommandManager.InvalidateRequerySuggested();

            CreateCommands();
        }
示例#4
0
        //private string _pkgPath;

        public UploaderTabVM(IR2RestClient restClient,
                             IPackageUploader packageUploader,
                             PreviousVersionsPopupVM previousVersionsPopupVM,
                             AccessCheckerVM accessCheckerVM,
                             PackageCheckerVM packageCheckerVM,
                             PackageUploaderVM packageUploaderVM)
        {
            PkgChecker    = packageCheckerVM;
            AccessChecker = accessCheckerVM;
            PkgUploader   = packageUploaderVM;
            Previous      = previousVersionsPopupVM;

            restClient.OnRetry += (s, e)
                                  => ClientStatus += $"{L.f}{e}";

            //ConfigLoader.PackagePathChanged += async (a, b) =>
            //{
            //    PkgUploader.DisableUpload();
            //    _pkgPath = b;
            //    await VerifyPackage();
            //};

            PkgChecker.PackageVerified += (a, pkg)
                                          => PkgUploader.EnableUpload(pkg);

            PkgUploader.UploadFinished += (a, r) =>
            {
                PkgUploader.DisableUpload();
                Alerter.Show(r, "Package Upload");

                if (r.IsSuccessful)
                {
                    PkgChecker.CheckPackageCmd.ExecuteIfItCan();
                }

                CommandManager.InvalidateRequerySuggested();
            };
        }
示例#5
0
 public FilesController(IPackageUploader packageUploader)
 {
     _packageUploader = packageUploader;
 }