Beispiel #1
0
 public AsyncCommand(Func <CancellationToken, Task> execute, ILongOperationService longOperationService, ICancelCommand cancelCommand, Func <bool> canExecute = null)
 {
     _execute = execute ?? throw new ArgumentNullException(nameof(execute));
     _longOperationService = longOperationService;
     _cancelCommand        = cancelCommand;
     _canExecute           = canExecute;
 }
Beispiel #2
0
 public MainVm(ILongOperationService longOperationService, IDialogService dialogService, IMapper mapper, IYusarRepository <SimpleString> repository)
 {
     _longOperationService = longOperationService;
     _dialogService        = dialogService;
     _mapper     = mapper;
     _repository = repository;
     Subscribe();
 }
Beispiel #3
0
 public SettingsScreenVm(
     IMusicCollectionManager musicCollectionManager,
     ILongOperationService longOperationService,
     IUserNotificationService userNotificationService,
     ILoggerManager manager) : base(longOperationService, userNotificationService, manager)
 {
     _musicCollectionManager = musicCollectionManager;
 }
Beispiel #4
0
 public MusicSearchScreenVm(
     DiscogsClient client,
     IMusicCollectionManager musicCollectionManager,
     IRepository repository, IMusicFileAnalyzer musicFileAnalyzer,
     IMusicDirAnalyzer musicDirAnalyzer,
     IFileManager fileManager,
     PreviewFactory previewFactory,
     ILongOperationService longOperationService,
     IUserNotificationService userNotificationService,
     ILoggerManager manager) : base(longOperationService, userNotificationService, manager)
 {
     _discogsClient          = client;
     _musicCollectionManager = musicCollectionManager;
     _repo = repository;
     _musicFileAnalyzer = musicFileAnalyzer;
     _musicDirAnalyzer  = musicDirAnalyzer;
     _fileManager       = fileManager;
     _previewFactory    = previewFactory;
 }
Beispiel #5
0
 public MusicCollectionScreenVm(
     IMusicCollectionManager musicCollectionManager,
     IImageCollectionManager imageCollectionManager,
     IFileManager fileManager,
     PreviewFactory previewFactory,
     ILongOperationService longOperationService,
     IUserNotificationService userNotificationService,
     ILoggerManager manager) : base(longOperationService, userNotificationService, manager)
 {
     _musicCollectionManager = musicCollectionManager;
     _imageCollectionManager = imageCollectionManager;
     _fileManager            = fileManager;
     _previewFactory         = previewFactory;
     _allArtists             = _musicCollectionManager.GetAllArtists().ToList();
     LoadAllArtistsInCollection();
     ShowAlbumsNotInCollection = false;
     IsSelectionEnabled        = false;
     MusicStyles = _musicCollectionManager.GetMusicStylesList();
     MusicGenres = _musicCollectionManager.GetMusicGenresList();
 }
 protected BaseScreenVm(ILongOperationService longOperationService, IUserNotificationService userNotificationService, ILoggerManager manager)
 {
     LongOperationService    = longOperationService;
     UserNotificationService = userNotificationService;
     log = manager.GetLogger(this);
 }
Beispiel #7
0
 public busy StartLongOperation(ILongOperationService server, ....)
 {
     //here you can make the method async using a TaskCompletionSource
     if(server.StartLongOperation(...)) Console.WriteLine("long oper started");