示例#1
0
        public VotesCountsBag(PoolSettings settings)
        {
            this.settings = settings;

            bag    = new List <VoteCount>();
            parser = new VoteCountsParser();
        }
示例#2
0
        public VoteCountsLogger(PoolSettings settings)
        {
            _settings = settings;

            voteCountsPool = new Pool <IVoteCountsBag>(_settings.VoteCountsBagPoolSize, f => new VoteCountsBagPooled(f, _settings), settings.PoolLoadingMode, settings.PoolAccessMode);

            StartFlushingTasks();
        }
        public VoteCountsBagPooled(Pool <IVoteCountsBag> pool, PoolSettings settings)
        {
            if (pool == null)
            {
                throw new ArgumentNullException("pool");
            }

            this.pool     = pool;
            internalStore = new VotesCountsBag(settings);
        }