Esempio n. 1
0
        public async void BaseInitParsers(NewsConfig config)
        {
            if (Current.POOL == new ConcurrentDictionary <string, Parser>())
            {
                var u = new ParserPool(config);
                await u.Run();

                SetCurrent(u);
            }
            else
            {
                await Current.Run();
            }
        }
Esempio n. 2
0
 public void SetCurrent(ParserPool u = null)
 {
     Current = u ?? this;
 }
 public InstantCacheSaveScheduler(ParserPool pool) : base(TimeSpan.FromHours(1))
 {
     this.pool = pool;
 }