public Tally(IServiceProvider serviceProvider, VoteConstructor constructor, IVoteCounter counter, IGeneralOutputOptions options, ILogger <Tally> logger) { this.serviceProvider = serviceProvider; voteConstructor = constructor; voteCounter = counter; outputOptions = options; this.logger = logger; // Hook up to event notifications outputOptions.PropertyChanged += Options_PropertyChanged; }
public TallyOutput( IVoteCounter counter, RankVoteCounterFactory rankVoteCounterFactory, ForumAdapterFactory forumAdapterFactory, IGeneralOutputOptions options) { voteCounter = counter; outputOptions = options; rankVoteCounter = rankVoteCounterFactory.CreateRankVoteCounter(options.RankVoteCounterMethod); if (voteCounter.Quest != null) { quest = voteCounter.Quest; forumAdapter = forumAdapterFactory.CreateForumAdapter(quest.ForumType, quest.ThreadUri); } else { quest = new Quest(); forumAdapter = forumAdapterFactory.CreateForumAdapter(ForumType.Unknown, Quest.InvalidThreadUri); } }