コード例 #1
0
        public DownloadsViewModel(IList<Download> downloads,
            IDownloadViewModelFactory downloadViewModelFactory,
            IDownloadSlotsViewModelAsyncFactory downloadSlotsViewModelAsyncFactory)
        {
            if (downloads == null)
                throw new ArgumentNullException("downloads");
            if (downloadViewModelFactory == null)
                throw new ArgumentNullException("downloadViewModelFactory");
            if (downloadSlotsViewModelAsyncFactory == null)
                throw new ArgumentNullException("downloadSlotsViewModelAsyncFactory");

            this.downloads = downloads;
            this.downloadViewModelFactory = downloadViewModelFactory;
            this.downloadSlotsViewModelAsyncFactory = downloadSlotsViewModelAsyncFactory;
            this.downloadSlotsViewModelAsyncFactory.InitializationCompleted +=
                downloadSlotsViewModelAsyncFactoryInitializationCompleted;
            this.fillDownloads();
        }
コード例 #2
0
        public DownloadsViewModel(IList <Download> downloads,
                                  IDownloadViewModelFactory downloadViewModelFactory,
                                  IDownloadSlotsViewModelAsyncFactory downloadSlotsViewModelAsyncFactory)
        {
            if (downloads == null)
            {
                throw new ArgumentNullException("downloads");
            }
            if (downloadViewModelFactory == null)
            {
                throw new ArgumentNullException("downloadViewModelFactory");
            }
            if (downloadSlotsViewModelAsyncFactory == null)
            {
                throw new ArgumentNullException("downloadSlotsViewModelAsyncFactory");
            }

            this.downloads = downloads;
            this.downloadViewModelFactory           = downloadViewModelFactory;
            this.downloadSlotsViewModelAsyncFactory = downloadSlotsViewModelAsyncFactory;
            this.downloadSlotsViewModelAsyncFactory.InitializationCompleted +=
                downloadSlotsViewModelAsyncFactoryInitializationCompleted;
            this.fillDownloads();
        }