public IList <VotingInfo.OptionData> GetOptionsDataList() { VotingInfo.OptionData[] array = new VotingInfo.OptionData[this.userOptions.Count]; for (int i = 0; i < this.userOptions.Count; i++) { array[i] = this.userOptions[i].OptionData; } return(array); }
public void AddOption(VotingInfo.OptionData data) { this.InitializeDefaults(); if (this.userOptions.Count == 31) { throw new ArgumentException("Can't add more options", data.DisplayName); } this.userOptions.Add(new VotingInfo.VotingOption(data, this.userOptions.Count + 1)); using (MemoryStream memoryStream = new MemoryStream()) { using (BinaryWriter binaryWriter = new BinaryWriter(memoryStream)) { this.Write(binaryWriter); } this.messageItem[InternalSchema.OutlookUserPropsVerbStream] = memoryStream.ToArray(); this.messageItem[InternalSchema.IsReplyRequested] = true; this.messageItem[InternalSchema.IsResponseRequested] = true; } }
internal VotingOption(VotingInfo.OptionData data, int verbId) : this(data.DisplayName, verbId) { this.sendPrompt = data.SendPrompt; }