Exemplo n.º 1
0
        public virtual bool DeleteOption(int optionID, string crc32Hash)
        {
            if (PollVotes.Count <= 1)
            {
                return(false);
            }
            string currentKey = PollVotes.ElementAt(optionID).Key;

            if (currentKey.HashCRC32() == crc32Hash)
            {
                PollVotes.Remove(currentKey);
                dBHandler.AddToQueue(this, true);
            }
            else
            {
                throw new FormatException("Hashes for poll vote do not match");
            }
            return(true);
        }
Exemplo n.º 2
0
 public virtual string GetOptionText(int optionID)
 {
     return(PollVotes.ElementAt(optionID).Key.RemoveAppendingText());
 }