public CollectionCommand GetCommand() { CollectionCommand collection = new CollectionCommand() { AlbumCollection = new List <Album> { new Album { Id = "1", Label = "123", Upc = "12333", Url = "http://foo", Name = "Mike", ImageUrl = "http://foo", IsCompilation = true, ReleaseDate = DateTime.Now, Artists = new List <Artist>() { new Artist { Id = "1", Name = "Mike" } } }, new Album { Id = "2", Label = "123", Upc = "12333", Url = "http://foo", Name = "Mike", ImageUrl = "http://foo", IsCompilation = true, ReleaseDate = DateTime.Now, Artists = new List <Artist>() { new Artist { Id = "2", Name = "Mike" } } } } }; return(collection); }
public FileSyncGroup() { Disposer = new Disposer(this); AddFilesCommand = new DelegateCommand(AddFiles); RemoveWatcherCommand = new DelegateCommand(RemoveWatcher, () => CanRemoveWatcher).ObservesProperty(() => CanRemoveWatcher); StartAllCommand = new CollectionCommand <ObservableCollection <FileWatcher>, FileWatcher>(_watchers, watcher => watcher.StartWatchCommand, ActiveStategy.WhenAny); StopAllCommand = new CollectionCommand <ObservableCollection <FileWatcher>, FileWatcher>(_watchers, watcher => watcher.StopWatchCommand, ActiveStategy.WhenAny); }
public async Task StartAsync(CancellationToken cancellationToken) { var id = new FileDownloadCommand { Id = "1AJ7icRJ5dfbWlQORocfrLhVyMOd242sm" }; var result = await _mediator.Send(id, cancellationToken); await _file.Extract(await result.Content.ReadAsByteArrayAsync()); var collections = new CollectionCommand() { AlbumCollection = _fileHelper.ParseFile() }; await _mediator.Send(collections, cancellationToken); }
public void CreateCollection(string name) => CollectionCommand.CreateCollection(new CollectionEntityDto() { Id = Guid.NewGuid(), Name = name });