Exemplo n.º 1
0
 public PublishPackageViewModel(
     MruPackageSourceManager mruSourceManager,
     ISettingsManager settingsManager,
     PackageViewModel viewModel)
 {
     _mruSourceManager   = mruSourceManager;
     _settingsManager    = settingsManager;
     _package            = viewModel.PackageMetadata;
     _packageFilePath    = viewModel.GetCurrentPackageTempFile();
     SelectedPublishItem = _mruSourceManager.ActivePackageSource;
     PublishAsUnlisted   = _settingsManager.PublishAsUnlisted;
 }
 public PublishPackageViewModel(
     MruPackageSourceManager mruSourceManager,
     ISettingsManager settingsManager,
     IUIServices uiServices,
     CredentialPublishProvider credentialPublishProvider,
     PackageViewModel viewModel)
 {
     _mruSourceManager          = mruSourceManager;
     _settingsManager           = settingsManager;
     _uiServices                = uiServices;
     _credentialPublishProvider = credentialPublishProvider;
     _package            = viewModel.PackageMetadata;
     _packageFilePath    = viewModel.GetCurrentPackageTempFile();
     SelectedPublishItem = _mruSourceManager.ActivePackageSource;
     PublishAsUnlisted   = _settingsManager.PublishAsUnlisted;
 }
Exemplo n.º 3
0
 public PublishPackageViewModel(
     MruPackageSourceManager mruSourceManager,
     ISettingsManager settingsManager,
     IUIServices uiServices,
     CredentialPublishProvider credentialPublishProvider,
     PackageViewModel viewModel)
 {
     if (viewModel is null)
     {
         throw new ArgumentNullException(nameof(viewModel));
     }
     _mruSourceManager          = mruSourceManager ?? throw new ArgumentNullException(nameof(mruSourceManager));
     _settingsManager           = settingsManager ?? throw new ArgumentNullException(nameof(settingsManager));
     _uiServices                = uiServices ?? throw new ArgumentNullException(nameof(uiServices));
     _credentialPublishProvider = credentialPublishProvider ?? throw new ArgumentNullException(nameof(credentialPublishProvider));
     _package            = viewModel.PackageMetadata;
     _packageFilePath    = viewModel.GetCurrentPackageTempFile();
     SelectedPublishItem = _mruSourceManager.ActivePackageSource;
     PublishAsUnlisted   = _settingsManager.PublishAsUnlisted;
 }