示例#1
0
#pragma warning disable 4014
        public ArticleRepository(ISettingsRepository settingsRepository, IProgressService progressService, IStorageService storageService, ISqliteService sqliteService, IThemeRepository themeRepository, IImageDownloadService imageDownloadService, IPermissionsService permissionsService)
        {
            _settingsRepository = settingsRepository;
            _progressService = progressService;
            _storageService = storageService;
            _sqliteService = sqliteService;
            _themeRepository = themeRepository;
            _imageDownloadService = imageDownloadService;
            _permissionsService = permissionsService;

            _articleGenericRepository = new GenericRepository<ArticleModel, ArticleEntity>(_sqliteService);
            _imageContentGenericRepository = new GenericRepository<ImageContentModel, ImageContentEntity>(_sqliteService);
            _textContentGenericRepository = new GenericRepository<TextContentModel, TextContentEntity>(_sqliteService);
            _galleryContentGenericRepository = new GenericRepository<GalleryContentModel, GalleryContentEntity>(_sqliteService);

            Initialize();
        }
示例#2
0
#pragma warning disable 4014
        public ArticleRepository(ISettingsRepository settingsRepository, IProgressService progressService, IStorageService storageService, ISqliteService sqliteService, IThemeRepository themeRepository, IImageDownloadService imageDownloadService, IPermissionsService permissionsService)
        {
            _settingsRepository   = settingsRepository;
            _progressService      = progressService;
            _storageService       = storageService;
            _sqliteService        = sqliteService;
            _themeRepository      = themeRepository;
            _imageDownloadService = imageDownloadService;
            _permissionsService   = permissionsService;

            _articleGenericRepository        = new GenericRepository <ArticleModel, ArticleEntity>(_sqliteService);
            _imageContentGenericRepository   = new GenericRepository <ImageContentModel, ImageContentEntity>(_sqliteService);
            _textContentGenericRepository    = new GenericRepository <TextContentModel, TextContentEntity>(_sqliteService);
            _galleryContentGenericRepository = new GenericRepository <GalleryContentModel, GalleryContentEntity>(_sqliteService);

            Initialize();
        }
示例#3
0
        public MainPageViewModel(IProgressService progressService, IArticleRepository articleRepository, ISettingsRepository settingsRepository, IHistoryNavigationService historyNavigationService, IDialogService dialogService, IPermissionsService permissionsService)
        {
            _articleRepository        = articleRepository;
            _historyNavigationService = historyNavigationService;
            _permissionsService       = permissionsService;

            _openSettingsCommand  = new RelayCommand(OpenSettings);
            _openInfoCommand      = new RelayCommand(OpenInfo);
            _refreshCommand       = new LoadingRelayCommand(Refresh, () => _canRefresh, true);
            _selectArticleCommand = new RelayCommand <ArticleModel>(SelectArticle);
            _selectFeedCommand    = new RelayCommand <FeedModel>(SelectFeed);

            _permissionsService.PermissionsChanged += PermissionsServiceOnPermissionsChanged;

            Sources = _articleRepository.GetActiveSources();

            if (!IsInDesignMode)
            {
                Initialize();
            }
        }
示例#4
0
        public MainPageViewModel(IProgressService progressService, IArticleRepository articleRepository, ISettingsRepository settingsRepository, IHistoryNavigationService historyNavigationService, IDialogService dialogService, IPermissionsService permissionsService)
        {
            _articleRepository = articleRepository;
            _historyNavigationService = historyNavigationService;
            _permissionsService = permissionsService;

            _openSettingsCommand = new RelayCommand(OpenSettings);
            _openInfoCommand = new RelayCommand(OpenInfo);
            _refreshCommand = new LoadingRelayCommand(Refresh, () => _canRefresh, true);
            _selectArticleCommand = new RelayCommand<ArticleModel>(SelectArticle);
            _selectFeedCommand = new RelayCommand<FeedModel>(SelectFeed);

            _permissionsService.PermissionsChanged += PermissionsServiceOnPermissionsChanged;

            Sources = _articleRepository.GetActiveSources();

            if (!IsInDesignMode)
            {
                Initialize();
            }
        }