Example #1
0
        static void Main(string[] args)
        {
            ServiceCreator creator = new ServiceCreator(
                new ApplicationContext(),
                new Mapper(new MapperConfiguration(cfg =>
            {
                cfg.AddProfile(new AutoMapperProfile());
            }))
                );

            var repo = new ElasticRepository(
                creator.CreateCategorieService(_connectionString),
                creator.CreateNewsService(_connectionString),
                creator.CreateUserService(_connectionString)
                );

            repo.SaveDocumentToElasticsearch().GetAwaiter().GetResult();
        }
Example #2
0
        static void Main(string[] args)
        {
            AutomapperConfig.Configure();
            Logger.InitLogger();

            ServiceCreator creator = new ServiceCreator(
                new ApplicationContext(),
                new Mapper(new MapperConfiguration(cfg =>
            {
                cfg.AddProfile(new AutoMapperProfile());
            }))
                );

            RSSFeeder feeder = new RSSFeeder(
                new RemoteLoaderFeed(),
                creator.CreateCategorieService(_connectionString),
                creator.CreateNewsService(_connectionString),
                creator.CreateFeederService(_connectionString),
                creator.CreateUserService(_connectionString));

            feeder.Run().GetAwaiter().GetResult();
        }
Example #3
0
 private IUserService CreateUserService()
 {
     return(serviceCreator.CreateUserService());
 }
Example #4
0
 private IUserService CreateUserService() => serviceCreator.CreateUserService();
Example #5
0
 private UserService CreateUserService()
 {
     return(serviceCreator.CreateUserService(ConnectionStringResolver.CurrentConnectionString));
 }