public ServerOverviewViewModel( IDataProvider dataProvider, IArtifactDownloader downloader, IFolderSelector folderSelector = null) { if (dataProvider == null) { throw new ArgumentNullException("dataProvider"); } if (downloader == null) { throw new ArgumentNullException("downloader"); } projects = new ProjectsViewModel(dataProvider); projects.PropertyChanged += ProjectPropertyChanged; projects.LoadItems(); this.downloader = downloader; this.folderSelector = folderSelector; }
private void ShowServerOverview(ServerCredentialsModel credentials) { artifactDownloader = new InteractiveArtifactDownloader( credentials.CreateClient(), worker); Activity = new ServerOverviewViewModel( new DataProvider( credentials.CreateClient(), worker), artifactDownloader, folderSelector); }