public ViewModelBase(IPlatformServices platformServices) { this.PlatformServices = platformServices; this.lockObject = new object(); this.cancellationTokenSource = new ResetableCancellationTokenSource(); }
public GenreListDataController(IDeezerSession session) { this.session = session; this.fetchState = new UpdatableFetchState(); this.tokenSource = new ResetableCancellationTokenSource(); this.genreList = new FixedSizeObservableCollection <IGenreViewModel>(); }
public MainThreadObservableCollectionAdapter(IObservableCollection <T> theCollection, IMainThreadDispatcher mainThreadDispatcher) { this.collection = theCollection; this.mainThreadDispatcher = mainThreadDispatcher; this.tokenSource = new ResetableCancellationTokenSource(); this.collection.CollectionChanged += Collection_CollectionChanged; }
public PagedObservableCollection(int pageSize = DEFAULT_PAGE_SIZE, int nextPageThreashold = DEFAULT_THREASHOLD) { this.PageSize = pageSize; this.nextPageThreashold = nextPageThreashold; this.pages = new Dictionary <int, IReadOnlyList <T> >(); this.pageFetchInProgress = new HashSet <int>(); this.cancellationTokenSource = new ResetableCancellationTokenSource(); }
public TracklistDataController(IDeezerSession session) { this.session = session; this.fetchState = new UpdatableFetchState(); this.completeItemFetchState = new UpdatableFetchState(); this.tokenSource = new ResetableCancellationTokenSource(); this.tracklist = new PagedObservableCollection <ITrackViewModel>(); this.ItemId = 0; this.Type = ETracklistType.Unknown; }
public WhatsNewDataController(IDeezerSession session) { this.session = session; this.CurrentGenreFilter = ulong.MaxValue; this.tokenSource = new ResetableCancellationTokenSource(); this.newReleaseFetchState = new UpdatableFetchState(); this.deezerPicksFetchState = new UpdatableFetchState(); this.newReleases = new PagedObservableCollection <IAlbumViewModel>(); this.deezerPicks = new PagedObservableCollection <IAlbumViewModel>(); }
public UserOverviewDataController(IDeezerSession session) { this.session = session; this.CurrentUserId = 0; this.tokenSource = new ResetableCancellationTokenSource(); this.flowFetchState = new UpdatableFetchState(); this.playlistsFetchState = new UpdatableFetchState(); this.completeProfileFetchState = new UpdatableFetchState(); this.flow = new PagedObservableCollection <ITrackViewModel>(); this.playlists = new FixedSizeObservableCollection <IPlaylistViewModel>(); }
public SearchDataController(IDeezerSession session) { this.session = session; this.tokenSource = new ResetableCancellationTokenSource(); this.albumsFetchState = new UpdatableFetchState(); this.tracksFetchState = new UpdatableFetchState(); this.artistsFetchState = new UpdatableFetchState(); this.playlistsFetchState = new UpdatableFetchState(); this.albumResults = new PagedObservableCollection <IAlbumViewModel>(); this.trackResults = new PagedObservableCollection <ITrackViewModel>(); this.artistResults = new PagedObservableCollection <IArtistViewModel>(); this.playlistResults = new PagedObservableCollection <IPlaylistViewModel>(); }
public ChartsDataController(IDeezerSession session) { this.session = session; this.CurrentGenreFilter = ulong.MaxValue; this.tokenSource = new ResetableCancellationTokenSource(); this.albumFetchState = new UpdatableFetchState(); this.trackFetchState = new UpdatableFetchState(); this.artistFetchState = new UpdatableFetchState(); this.playlistFetchState = new UpdatableFetchState(); this.albums = new PagedObservableCollection <IAlbumViewModel>(); this.tracks = new PagedObservableCollection <ITrackViewModel>(); this.artists = new PagedObservableCollection <IArtistViewModel>(); this.playlists = new PagedObservableCollection <IPlaylistViewModel>(); }
public ArtistOverviewDataController(IDeezerSession session) { this.session = session; this.ArtistId = ulong.MaxValue; this.tokenSource = new ResetableCancellationTokenSource(); this.albumFetchState = new UpdatableFetchState(); this.topTrackFetchState = new UpdatableFetchState(); this.playlistFetchState = new UpdatableFetchState(); this.completeArtistFetchState = new UpdatableFetchState(); this.relatedArtistsFetchState = new UpdatableFetchState(); this.albums = new PagedObservableCollection <IAlbumViewModel>(); this.topTracks = new PagedObservableCollection <ITrackViewModel>(); this.playlists = new PagedObservableCollection <IPlaylistViewModel>(); this.relatedArtists = new PagedObservableCollection <IArtistViewModel>(); }
public FavouritesService(IDeezerSession session, IAuthenticationService authService) { Assert.That(MIN_THROTTLE_MS < MAX_THROTTLE_MS, "Invalid throttle values set."); this.session = session; this.authService = authService; this.userPlaylists = new HashSet <ulong>(); this.favouriteTracks = new HashSet <ulong>(); this.favouriteAlbums = new HashSet <ulong>(); this.favouriteArtists = new HashSet <ulong>(); this.favouritePlaylists = new HashSet <ulong>(); this.tokenSource = new ResetableCancellationTokenSource(); this.IsLoggedIn = false; this.authService.OnAuthenticationStatusChanged += OnAuthStateChanged; }