public CloudDriveTransferViewModel(IEventAggregator eventAggregator, IWebDavClientService webDavClientService, ISwitchContentService switchContentService , ITransferDataService transferDataService) { this._eventAggregator = eventAggregator; this._webDavClientService = webDavClientService; this._switchContentService = switchContentService; this._transferDataService = transferDataService; this.TransferInfos = new ObservableCollection <TransferInfo>(this._transferDataService.RetriveHistory()); this.BackCommand = new DelegateCommand(this.Back, this.CanBack); this.ClearCommand = new DelegateCommand(this.Clear, this.CanClear); this.CancelAllCommand = new DelegateCommand(this.CancelAll, this.CanCancelAll); this.NavigateItemCommand = new DelegateCommand <TransferInfo>(this.NavigateItem, this.CanNavigateItem); this.CancelTransferCommand = new DelegateCommand <TransferInfo>(this.CancelTransfer, this.CanCancelTransfer); this._eventAggregator.GetEvent <PubSubEvent <TransferActionInfo> >().Subscribe(UploadOrDownloadAction); this._eventAggregator.GetEvent <PubSubEvent <EditorActionInfo> >().Subscribe(EditorAction); this._eventAggregator.GetEvent <WindowClosingEvent>().Subscribe(SaveTransferInfos, ThreadOption.UIThread); }
public static void SetMockedImplementation(ITransferDataService implementation) => _implementation = implementation;
public static void Reset() => _implementation = new TransferDataService();