/// <summary> /// An abstract boolean voting. /// </summary> /// <param name="VoteEvaluator">A delegate to evaluate the result of the voting.</param> public ABooleanVote(VoteEvaluator <Boolean> VoteEvaluator) { if (VoteEvaluator == null) { throw new ArgumentNullException("VoteEvaluator", "The given VoteEvaluator must not be null!"); } this.VoteEvaluator = VoteEvaluator; }
/// <summary> /// A vote is a simple way to ask multiple event subscribers /// about their opinion and to evaluate the results. /// </summary> /// <param name="InitialVote">An initial vote.</param> /// <param name="VoteEvaluator">A delegate for evaluating a vote based on the overall number of votes and a shared integer.</param> public AVote(Int32 InitialVote, VoteEvaluator<TResult> VoteEvaluator) { #region Initial Checks if (VoteEvaluator == null) throw new ArgumentNullException("VoteEvaluator", "The given VoteEvaluator delegate must not be null!"); #endregion this._Vote = InitialVote; this._NumberOfVotes = 0; this.VoteEvaluator = VoteEvaluator; }