コード例 #1
0
 public static void ClassInitialize(TestContext _)
 {
     _setRepository           = new SetRepository(MemoryRepositoryService);
     _referenceDataRepository = new ReferenceDataRepository(MemoryRepositoryService);
     _themeRepository         = new ThemeRepository(MemoryRepositoryService);
     _subthemeRepository      = new SubthemeRepository(MemoryRepositoryService);
 }
コード例 #2
0
 public ThemeController(IThemeRepository themes, IInstallationManager installationManager, IWebHostEnvironment environment, ILogManager logger)
 {
     _themes = themes;
     _installationManager = installationManager;
     _environment         = environment;
     _logger = logger;
 }
コード例 #3
0
 public ThemeController(IThemeRepository Themes, IInstallationManager InstallationManager, IWebHostEnvironment environment, ILogManager logger)
 {
     this.Themes = Themes;
     this.InstallationManager = InstallationManager;
     this.environment         = environment;
     this.logger = logger;
 }
コード例 #4
0
 public ThemeProvider(
     ISiteManifestRepository siteManifestRepository,
     IThemeRepository themeRepository)
 {
     _siteManifestRepository = siteManifestRepository;
     _themeRepository        = themeRepository;
 }
コード例 #5
0
 public static void ClassInitialize(TestContext _)
 {
     _bricksetUserRepository = new BricksetUserRepository(MemoryRepositoryService);
     _themeRepository        = new ThemeRepository(MemoryRepositoryService);
     _subthemeRepository     = new SubthemeRepository(MemoryRepositoryService);
     _setRepository          = new SetRepository(MemoryRepositoryService);
 }
コード例 #6
0
ファイル: ArticleHelper.cs プロジェクト: famoser/OfflineMedia
 public static IMediaSourceHelper GetMediaSource(FeedModel fm, IThemeRepository themeRepository)
 {
     if (fm.Source != null)
     {
         return(GetMediaSource(fm.Source.Source, themeRepository));
     }
     return(null);
 }
コード例 #7
0
ファイル: ArticleHelper.cs プロジェクト: famoser/OfflineMedia
 public static IMediaSourceHelper GetMediaSource(ArticleModel am, IThemeRepository themeRepository)
 {
     if (am.Feed?.Source != null)
     {
         return(GetMediaSource(am.Feed.Source.Source, themeRepository));
     }
     return(null);
 }
コード例 #8
0
 public RoomController(IGameRoomRepository roomRepo, IPlayerScoreRepository scoreRepo, IPlayerRepository playerRepo, IDrawingRepository drawingRepo, IThemeRepository themeRepo)
 {
     _roomRepository    = roomRepo;
     _themeRepository   = themeRepo;
     _scoreRepository   = scoreRepo;
     _playerRepository  = playerRepo;
     _drawingRepository = drawingRepo;
 }
コード例 #9
0
 public ThemeFacade(IThemeRepository themeRepository,
                    ICacheManager cacheManager,
                    IMapper mapper)
 {
     _themeRepository = themeRepository;
     _cacheManager    = cacheManager;
     _mapper          = mapper;
 }
コード例 #10
0
 public CreateThemeHandler(IThemeRepository themeRepository,
                           IValidator <CreateTheme> validator,
                           IThemeSortOrderGenerator sortOrderGenerator)
 {
     _themeRepository    = themeRepository;
     _validator          = validator;
     _sortOrderGenerator = sortOrderGenerator;
 }
コード例 #11
0
 public ColorsSettingsPageController(
     IColorsSettingsPage page, IThemeRepository themeRepository,
     IThemePathProvider themePathProvider)
 {
     _page              = page;
     _themeRepository   = themeRepository;
     _themePathProvider = themePathProvider;
 }
コード例 #12
0
 public GalleryController(
     IMapper mapper,
     IExtensionsMetadataRepository metadataRepository,
     IThemeRepository themeStoreRepository)
 {
     _mapper             = mapper;
     _metadataRepository = metadataRepository;
     _themeRepository    = themeStoreRepository;
 }
コード例 #13
0
 public ThemeSynchronizer(
     IBricksetApiService bricksetService,
     IThemeRepository themeRepository,
     IMessageHub messageHub)
 {
     _bricksetApiService = bricksetService;
     _themeRepository    = themeRepository;
     _messageHub         = messageHub;
 }
 public ColorSettingsPageTestContext(
     IColorsSettingsPage page,
     ColorsSettingsPageController controller,
     IThemeRepository themeRepository)
 {
     Page            = page;
     Controller      = controller;
     ThemeRepository = themeRepository;
 }
コード例 #15
0
 public ThemeStoreRefresher(
     IVSAssetsClient assetsClient,
     IVSExtensionHandler extensionHandler,
     IThemeRepository themeRepository,
     IExtensionsMetadataRepository metadataRepository)
 {
     _assetsClient       = assetsClient;
     _extensionHandler   = extensionHandler;
     _themeRepository    = themeRepository;
     _metadataRepository = metadataRepository;
 }
コード例 #16
0
ファイル: ArticleHelper.cs プロジェクト: famoser/OfflineMedia
        public static IMediaSourceHelper GetMediaSource(Sources source, IThemeRepository themeRepository)
        {
            switch (source)
            {
            case Sources.Nzz:
                return(new NzzHelper(themeRepository));

            case Sources.Blick:
            case Sources.BlickAmAbend:
                return(new BlickHelper(themeRepository));

            case Sources.Postillon:
                return(new PostillonHelper(themeRepository));

            case Sources.ZwanzigMin:
                return(new ZwanzigMinHelper(themeRepository));

            case Sources.Stern:
                return(new SternHelper(themeRepository));

            case Sources.Spiegel:
                return(new SpiegelHelper(themeRepository));

            case Sources.Bild:
                return(new BildHelper(themeRepository));

            case Sources.Zeit:
                return(new ZeitHelper(themeRepository));

            case Sources.Welt:
                return(new WeltHelper(themeRepository));

            case Sources.BaslerZeitung:
            case Sources.BernerZeitung:
            case Sources.DerBund:
            case Sources.Tagesanzeiger:
            case Sources.LeMatin:
            case Sources.VingtQuatreHeures:
            case Sources.TribuneDeGeneve:
            case Sources.ZuerichseeZeitung:
            case Sources.Landbote:
            case Sources.ZuericherUnterlaender:
            case Sources.BernerOeberlaender:
            case Sources.ThunerTagblatt:
            case Sources.LangenthalerTagblatt:
                return(new TamediaHelper(themeRepository));

            default:
                throw new ArgumentOutOfRangeException(nameof(source), source, null);
            }
        }
コード例 #17
0
 public PagesController(
     IPageRepository pageRepository,
     IPageVersionRepository pageVersionRepository,
     IHttpContextAccessor httpContextAccessor,
     IThemeRepository themeRepository,
     IPageTemplateRepository pageTemplateRepository,
     IPageService pageService)
 {
     _pageRepository         = pageRepository;
     _pageVersionRepository  = pageVersionRepository;
     _httpContextAccessor    = httpContextAccessor;
     _themeRepository        = themeRepository;
     _pageTemplateRepository = pageTemplateRepository;
     _pageService            = pageService;
 }
コード例 #18
0
        public void SetUp()
        {
            var optionsBuilder = new DbContextOptionsBuilder <WeapsyDbContext>();

            optionsBuilder.UseInMemoryDatabase();
            _dbContext = new WeapsyDbContext(optionsBuilder.Options);

            _themeId1 = Guid.NewGuid();
            _themeId2 = Guid.NewGuid();

            _dbContext.Set <ThemeDbEntity>().AddRange
            (
                new ThemeDbEntity
            {
                Id          = _themeId1,
                Name        = "Name 1",
                Description = "Description 1",
                Folder      = "Folder 1",
                Status      = ThemeStatus.Active
            },
                new ThemeDbEntity
            {
                Id          = _themeId2,
                Name        = "Name 2",
                Description = "Description 2",
                Folder      = "Folder 2",
                Status      = ThemeStatus.Active
            },
                new ThemeDbEntity
            {
                Status = ThemeStatus.Deleted
            }
            );

            _dbContext.SaveChanges();

            var mapperMock = new Mock <AutoMapper.IMapper>();

            mapperMock.Setup(x => x.Map <ThemeDbEntity>(It.IsAny <Theme>())).Returns(new ThemeDbEntity());
            mapperMock.Setup(x => x.Map <Theme>(It.IsAny <ThemeDbEntity>())).Returns(new Theme());
            mapperMock.Setup(x => x.Map <ICollection <Theme> >(It.IsAny <ICollection <ThemeDbEntity> >())).Returns(new List <Theme>
            {
                ThemeFactory.Theme(_themeId1, "Name", "Description", "Folder"),
                ThemeFactory.Theme(_themeId2, "Name", "Description", "Folder")
            });

            _sut = new ThemeRepository(_dbContext, mapperMock.Object);
        }
コード例 #19
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();
        }
コード例 #20
0
 public SetSynchronizer(
     IBricksetApiService bricksetApiService,
     ISetRepository setRepository,
     IReferenceDataRepository referenceDataRepository,
     IThemeRepository themeRepository,
     ISubthemeRepository subthemeRepository,
     IThumbnailSynchronizer thumbnailSynchronizer,
     IMessageHub messageHub)
 {
     _bricksetApiService      = bricksetApiService;
     _setRepository           = setRepository;
     _referenceDataRepository = referenceDataRepository;
     _themeRepository         = themeRepository;
     _subthemeRepository      = subthemeRepository;
     _thumbnailSynchronizer   = thumbnailSynchronizer;
     _messageHub = messageHub;
 }
コード例 #21
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();
        }
コード例 #22
0
ファイル: ArticleHelper.cs プロジェクト: famoser/OfflineMedia
        public static IMediaSourceHelper GetMediaSource(Sources source, IThemeRepository themeRepository)
        {
            switch (source)
            {
                case Sources.Nzz:
                    return new NzzHelper(themeRepository);
                case Sources.Blick:
                case Sources.BlickAmAbend:
                    return new BlickHelper(themeRepository);
                case Sources.Postillon:
                    return new PostillonHelper(themeRepository);
                case Sources.ZwanzigMin:
                    return new ZwanzigMinHelper(themeRepository);
                case Sources.Stern:
                    return new SternHelper(themeRepository);
                case Sources.Spiegel:
                    return new SpiegelHelper(themeRepository);
                case Sources.Bild:
                    return new BildHelper(themeRepository);
                case Sources.Zeit:
                    return new ZeitHelper(themeRepository);
                case Sources.Welt:
                    return new WeltHelper(themeRepository);

                case Sources.BaslerZeitung:
                case Sources.BernerZeitung:
                case Sources.DerBund:
                case Sources.Tagesanzeiger:
                case Sources.LeMatin:
                case Sources.VingtQuatreHeures:
                case Sources.TribuneDeGeneve:
                case Sources.ZuerichseeZeitung:
                case Sources.Landbote:
                case Sources.ZuericherUnterlaender:
                case Sources.BernerOeberlaender:
                case Sources.ThunerTagblatt:
                case Sources.LangenthalerTagblatt:
                    return new TamediaHelper(themeRepository);
                default:
                    throw new ArgumentOutOfRangeException(nameof(source), source, null);
            }
        }
コード例 #23
0
        public void Should_save_new_theme()
        {
            var newTheme         = ThemeFactory.Theme(Guid.NewGuid(), "Name 3", "Description 3", "Folder 3");
            var newThemeDbEntity = new ThemeDbEntity
            {
                Id          = newTheme.Id,
                Name        = newTheme.Name,
                Description = newTheme.Description,
                Folder      = newTheme.Folder
            };

            var mapperMock = new Mock <IMapper>();

            mapperMock.Setup(x => x.Map <ThemeDbEntity>(newTheme)).Returns(newThemeDbEntity);
            mapperMock.Setup(x => x.Map <Theme>(newThemeDbEntity)).Returns(newTheme);

            _sut = new ThemeRepository(_dbContext, mapperMock.Object);

            _sut.Create(newTheme);

            var actual = _sut.GetById(newTheme.Id);

            Assert.NotNull(actual);
        }
コード例 #24
0
ファイル: ArticleHelper.cs プロジェクト: famoser/OfflineMedia
 public static IMediaSourceHelper GetMediaSource(FeedModel fm, IThemeRepository themeRepository)
 {
     if (fm.Source != null)
         return GetMediaSource(fm.Source.Source, themeRepository);
     return null;
 }
コード例 #25
0
 public ThemeController(IThemeRepository Themes, IInstallationManager InstallationManager)
 {
     this.Themes = Themes;
     this.InstallationManager = InstallationManager;
 }
コード例 #26
0
ファイル: ActivateThemeHandler.cs プロジェクト: zdlian/Weapsy
 public ActivateThemeHandler(IThemeRepository themeRepository)
 {
     _themeRepository = themeRepository;
 }
コード例 #27
0
ファイル: ThemeRules.cs プロジェクト: leigh-pointer/Weapsy
 public ThemeRules(IThemeRepository themeRepository)
 {
     _themeRepository = themeRepository;
 }
コード例 #28
0
 public DeleteThemeHandler(IThemeRepository themeRepository)
 {
     _themeRepository = themeRepository;
 }
コード例 #29
0
 public SettingsController(IThemeRepository themeRepository, ISettingRepository settingRepository)
 {
     this.themeRepository   = themeRepository;
     this.settingRepository = settingRepository;
 }
コード例 #30
0
 protected BaseMediaSourceHelper(IThemeRepository themeRepository)
 {
     _themeRepository = themeRepository;
 }
コード例 #31
0
 public PostillonHelper(IThemeRepository themeRepository) : base(themeRepository)
 {
 }
コード例 #32
0
ファイル: BildHelper.cs プロジェクト: famoser/OfflineMedia
 public BildHelper(IThemeRepository themeRepository) : base(themeRepository)
 {
 }
コード例 #33
0
ファイル: SternHelper.cs プロジェクト: famoser/OfflineMedia
 public SternHelper(IThemeRepository themeRepository) : base(themeRepository)
 {
 }
コード例 #34
0
ファイル: ArticleHelper.cs プロジェクト: famoser/OfflineMedia
 public static IMediaSourceHelper GetMediaSource(ArticleModel am, IThemeRepository themeRepository)
 {
     if (am.Feed?.Source != null)
         return GetMediaSource(am.Feed.Source.Source, themeRepository);
     return null;
 }
コード例 #35
0
ファイル: TamediaHelper.cs プロジェクト: famoser/OfflineMedia
 public TamediaHelper(IThemeRepository themeRepository) : base(themeRepository)
 {
 }
コード例 #36
0
ファイル: NzzHelper.cs プロジェクト: famoser/OfflineMedia
 public NzzHelper(IThemeRepository themeRepository) : base(themeRepository)
 {
 }
コード例 #37
0
 public TopicController(IThemeRepository themeRepository, ITopicRepository topicRepository, ILogger<TopicController> logger)
 {
     _themeRepository = themeRepository;
     _topicRepositoryrepository = topicRepository;
     _logger = logger;
 }
コード例 #38
0
 public WeltHelper(IThemeRepository themeRepository) : base(themeRepository)
 {
 }
コード例 #39
0
ファイル: WeltHelper.cs プロジェクト: famoser/OfflineMedia
 public WeltHelper(IThemeRepository themeRepository) : base(themeRepository)
 {
 }
コード例 #40
0
 public UserController()
 {
     themeRepository = new ThemeRepository();
 }
コード例 #41
0
 public ZwanzigMinHelper(IThemeRepository themeRepository) : base(themeRepository)
 {
 }
コード例 #42
0
 public ThemeController(IThemeRepository Themes)
 {
     this.Themes = Themes;
 }
コード例 #43
0
 public ThemeController(IThemeRepository repository, ILogger<ThemeController> logger)
 {
     _repository = repository;
     _logger = logger;
 }
コード例 #44
0
 public TestingService(IThemeRepository themeRepository, IQuestionRepository questionRepository, IAnswerRepository answerRepository)
 {
     this.themeRepository = themeRepository;
     this.answerRepository = answerRepository;
     this.questionRepository = questionRepository;
 }
コード例 #45
0
ファイル: ThemeService.cs プロジェクト: ekaterinatsmyg/Forum
 public ThemeService(IUnitOfWork uow, IThemeRepository repository)
 {
     this.uow = uow;
     this.themeRepository = repository;
 }
コード例 #46
0
 static ThemeHelper()
 {
     themeRepository = new ThemeRepository();
 }
コード例 #47
0
ファイル: TamediaHelper.cs プロジェクト: famoser/OfflineMedia
 public TamediaHelper(IThemeRepository themeRepository) : base(themeRepository)
 {
 }
コード例 #48
0
 public ThemeSortOrderGenerator(IThemeRepository themeRepository)
 {
     _themeRepository = themeRepository;
 }
コード例 #49
0
ファイル: SpiegelHelper.cs プロジェクト: famoser/OfflineMedia
 public SpiegelHelper(IThemeRepository themeRepository) : base(themeRepository)
 {
 }