Exemple #1
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();
        }