示例#1
0
 public CloseVoiceChannelType(pCloseVoiceChannelType c)
     : base(c.Time)
 {
     if (!NameLists.voicechannelNames.ContainsKey(c.Channel)) throw new ApplicationException("Cannot close non-existent voice channel " + c.Channel);
     this.Time = c.Time;
     this.channel = c.Channel;
     if (null != c.Requestor)
         this.requestor = c.Requestor;
 }
示例#2
0
        public override pCloseVoiceChannelType pGetCloseVoiceChannel()
        {
            pCloseVoiceChannelType returnValue;
            string channel = "Unknown voice channel";
            int time;
            try
            {
                reader.Read();
                channel = pGetString();
                time = pGetInt();

                returnValue = new pCloseVoiceChannelType(channel, time);
                if ("Requestor" == reader.Name)
                    returnValue.Requestor = pGetString();
                reader.ReadEndElement();
                return returnValue;
            }
            catch (SystemException e)
            {
                throw new ApplicationException("Could not read CloseVoiceChannel for channel " + channel, e);
            }
        }