Example #1
0
 public MovieController(IMovieRepository movieRepository, IDataStoreRepository dataStoreRepository, IContentLoader contentLoader, IPageRouteHelper pageRouteHelper)
 {
     _movieRepository     = movieRepository;
     _dataStoreRepository = dataStoreRepository;
     _contentLoader       = contentLoader;
     _pageRouteHelper     = pageRouteHelper;
 }
        public ManagementConfiguration()
        {
            queueRepositoryType = ConfigurationItem<string>.ReadSetting("QueueRepositoryType", string.Empty);
            queueRepository = new NullQueueRepository();
            HasQueueRepository = false;

            dataStoreRepositoryType = ConfigurationItem<string>.ReadSetting("DataStoreRepositoryType", string.Empty);
            dataStoreRepository = new NullDataStoreRepository();
            HasDataStoreRepository = false;
        }
Example #3
0
 public StreamAnnouncer(DiscordSocketClient discordClient, ITwitchApiHelper twitchApiHelper,
                        ILogger <StreamAnnouncer> logger, IDataStoreRepository <Streamer> streamerRepository,
                        IOptions <ConfigSettings> settings, IDataStoreRepository <AnnouncementMessages> announcementMessageRepository,
                        IDataStoreRepository <DiscordSettings> discordSettingsRepository,
                        IDataStoreRepository <PinnedMessage> pinnedMessageRepository)
 {
     _discordClient                 = discordClient;
     _twitchApiHelper               = twitchApiHelper;
     _logger                        = logger;
     _streamerRepository            = streamerRepository;
     _announcementMessageRepository = announcementMessageRepository;
     _discordSettingsRepository     = discordSettingsRepository;
     _pinnedMessageRepository       = pinnedMessageRepository;
     _configSettings                = settings.Value;
 }
Example #4
0
 public SettingsModule(IDataStoreRepository <DiscordSettings> discordSettingsRepository,
                       IDataStoreRepository <PinnedMessage> pinnedMessageRepository)
 {
     _discordSettingsRepository = discordSettingsRepository;
     _pinnedMessageRepository   = pinnedMessageRepository;
 }
 public ScheduledJobDeleteBadReview(IDataStoreRepository dataStoreRepository)
 {
     IsStoppable          = true;
     _dataStoreRepository = dataStoreRepository;
 }
Example #6
0
 public VisitLogService(IExclusionEntryRepository exclusionEntryRepository, IDataStoreRepository dataStoreRepository)
 {
     _exclusionEntryRepository = exclusionEntryRepository;
     _dataStoreRepository      = dataStoreRepository;
 }
        private void InitializeDataStoreRepository()
        {
            Log.Debug("Initializing DataStoreRepositoryType.");

            if (string.IsNullOrEmpty(DataStoreRepositoryType))
            {
                Log.Warning(ManagementResources.NoDataStoreRepositoryTypeSpecified);

                return;
            }

            Log.Information(string.Format(ManagementResources.AttemptCreationOfDataStoreRepository, DataStoreRepositoryType));

            try
            {
                var type = new ReflectionService().GetType(
                    candidate =>
                    candidate.Name.Equals(DataStoreRepositoryType, StringComparison.InvariantCultureIgnoreCase)
                    ||
                    candidate.AssemblyQualifiedName.Equals(DataStoreRepositoryType, StringComparison.InvariantCultureIgnoreCase));

                if (type == null)
                {
                    Log.Error(string.Format(ManagementResources.DataStoreRepositoryTypeNotFound, DataStoreRepositoryType));

                    return;
                }

                dataStoreRepository = (IDataStoreRepository)Activator.CreateInstance(type);

                HasDataStoreRepository = true;

                Log.Information(string.Format(ManagementResources.DataStoreRepositoryCreationSuccessful, DataStoreRepositoryType));
            }
            catch (Exception ex)
            {
                Log.Error(string.Format(ManagementResources.DataStoreRepositoryCreationException, DataStoreRepositoryType, ex.CompactMessages()));
            }
        }
Example #8
0
 public DataStoreService(IDataStoreRepository dataStoreRepository)
 {
     _dataStoreRepository = dataStoreRepository;
 }
Example #9
0
 public HandleReviewController(IDataStoreRepository repository, IMovieRepository movieRepository)
 {
     _repository      = repository;
     _movieRepository = movieRepository;
 }
Example #10
0
 public SearchService(IDataStoreRepository dataStoreRepository)
 {
     _dataStoreRepository = dataStoreRepository;
 }
Example #11
0
 public MovieReviewResultController(IDataStoreRepository dataStoreRepository)
 {
     _dataStoreRepository = dataStoreRepository;
 }
 public LoginService(IDataStoreRepository dataStoreRepository)
 {
     _dataStoreRepository = dataStoreRepository;
 }
Example #13
0
 public TwitchModule(IDataStoreRepository <Streamer> streamerRepository)
 {
     _streamerRepository = streamerRepository;
 }