Ejemplo n.º 1
0
        public BoardArchiver(YotsubaConfig config, IThreadConsumer threadConsumer, IStateStore stateStore = null, ProxyProvider proxyProvider = null)
        {
            Config         = config;
            ThreadConsumer = threadConsumer;
            ProxyProvider  = proxyProvider ?? new NullProxyProvider();
            StateStore     = stateStore ?? new NullStateStore();

            ApiCooldownTimespan = TimeSpan.FromSeconds(config.ApiDelay ?? 1);
            BoardUpdateTimespan = TimeSpan.FromSeconds(config.BoardDelay ?? 30);
        }
Ejemplo n.º 2
0
        public BoardArchiver(YotsubaConfig config, IThreadConsumer threadConsumer, FifoSemaphore apiSemaphore = null)
        {
            Config         = config;
            ThreadConsumer = threadConsumer;

            APISemaphore = apiSemaphore ?? new FifoSemaphore(1);

            ApiCooldownTimespan = TimeSpan.FromSeconds(config.ApiDelay ?? 1);
            BoardUpdateTimespan = TimeSpan.FromSeconds(config.BoardDelay ?? 30);
        }