public ArtistsViewModel(IScreen hostScreen, IWrappedService wrappedService) { HostScreen = hostScreen; this.wrappedService = wrappedService; NextCommand = ReactiveCommand.CreateFromTask(Next); FetchArtists(); }
public UserProfileViewModel(IScreen hostScreen, IPlexApi plexApi, IWrappedService wrappedService) { this.plexApi = plexApi; this.wrappedService = wrappedService; HostScreen = hostScreen; FetchPlexUserCommand = ReactiveCommand.CreateFromTask(FetchPlexUser); StartWrappedCommand = ReactiveCommand.CreateFromTask(StartWrapped); FetchPlexUserCommand.IsExecuting.ToProperty(this, x => x.IsFetchingPlexUser, out isFetchingPlexUser); this.isAServerSelected = this.WhenAnyValue(x => x.SelectedSever) .Select(v => v != null) .ToProperty(this, x => x.IsAServerSelected); FetchPlexUserCommand.Execute(); }
public MediaPageViewModel(IScreen hostScreen, IWrappedService wrappedService) { HostScreen = hostScreen; this.wrappedService = wrappedService; FetchMedias(); }