Ejemplo n.º 1
0
        public PollItemCollectionV5(string value)
        {
            StringTable table = StringTable.Parse(value);

            PollItemCollectionV5 pollItems = new PollItemCollectionV5();

            for (int i = 0; i < table.Count; i++)
            {
                PollItem item = new PollItem(table["pollItemCollection_" + i]);
                this.Add(item);
            }
        }
Ejemplo n.º 2
0
        public static string GetExtendData(bool alwaysEyeable, DateTime expiresDate, int multiple, PollItemCollectionV5 pollItems, List <int> votedUserIDs)
        {
            StringTable table = new StringTable();

            table.Add("alwaysEyeable", alwaysEyeable.ToString());
            table.Add("expiresDate", expiresDate.ToString());
            table.Add("multiple", multiple.ToString());
            table.Add("pollItems", pollItems.ToString());
            table.Add("votedUserIDs", StringUtil.Join(votedUserIDs, ","));
            return(table.ToString());
        }