public bool CastVote(Dem2Model.Voting onWhat, Vote vote) { bool voteRegistered = onWhat.RegisterVote(vote); if (voteRegistered) { VoteCast(this, onWhat, vote); } return voteRegistered; }
public bool CastVoteFromLeader(IVotingLeader leader, Voting onWhat, Vote vote) { bool voteRegistered = onWhat.RegisterVote(vote); if (voteRegistered) { VoteCast(this, onWhat, vote); } return voteRegistered; }
public override bool RegisterVote(Vote vote) { { if (this.State == VotingStates.Ongoing) { return EntityRepository.Add(vote); } else { return false; } } }
public bool Equals(Vote second) { // If parameter is null return false: if ((object)second == null) { return false; } // Return true if the fields match: return OwnerId.Equals(second.OwnerId) && subjectId == second.subjectId; }
public virtual bool RegisterVote(Vote vote) { return EntityRepository.Add(vote); }