コード例 #1
0
        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);
        }
コード例 #2
0
 public static void SetMockedImplementation(ITransferDataService implementation) =>
 _implementation = implementation;
コード例 #3
0
 public static void Reset() => _implementation = new TransferDataService();