Exemplo n.º 1
0
 /// <summary>
 /// IList.Insert
 /// </summary>
 /// <param name="index"></param>
 /// <param name="addr"></param>
 public virtual void Insert(int index, unsuccess_sme addr)
 {
     if (this.Count > MAX_COUNT)
     {
         throw new ArgumentException("Too many address objects in collection, max count allowed is " + MAX_COUNT.ToString());
     }
     InnerList.Insert(index, addr);
 }
Exemplo n.º 2
0
 /// <summary>
 /// IList.Add
 /// </summary>
 /// <param name="addr"></param>
 /// <returns></returns>
 public virtual int Add(unsuccess_sme addr)
 {
     if (this.Count > MAX_COUNT)
     {
         throw new ArgumentException("Too many unsuccess_sme objects in collection, max count allowed is " + MAX_COUNT.ToString());
     }
     return(InnerList.Add(addr));
 }
Exemplo n.º 3
0
 /// <summary>
 /// This method adds our information to the byte stream.
 /// </summary>
 /// <param name="writer"></param>
 public void AddToStream(SmppWriter writer)
 {
     writer.Add((byte)this.Count);
     for (int i = 0; i < this.Count; ++i)
     {
         unsuccess_sme addr = this[i];
         addr.AddToStream(writer);
     }
 }
Exemplo n.º 4
0
        /// <summary>
        /// This method retrieves the address array from the byte stream
        /// </summary>
        /// <param name="reader">Byte stream</param>
        public void GetFromStream(SmppReader reader)
        {
            int count = (int)reader.ReadByte();

            for (int i = 0; i < count; ++i)
            {
                unsuccess_sme addr = new unsuccess_sme();
                addr.GetFromStream(reader);
                Add(addr);
            }
            if (this.Count > MAX_COUNT)
            {
                throw new ArgumentException("Too many address objects in collection, max count allowed is " + MAX_COUNT.ToString());
            }
        }
Exemplo n.º 5
0
 /// <summary>
 /// IList.Remove
 /// </summary>
 /// <param name="addr"></param>
 public virtual void Remove(unsuccess_sme addr)
 {
     InnerList.Remove(addr);
 }
Exemplo n.º 6
0
 /// <summary>
 /// IList.IndexOf
 /// </summary>
 /// <param name="addr"></param>
 /// <returns></returns>
 public virtual int IndexOf(unsuccess_sme addr)
 {
     return(InnerList.IndexOf(addr));
 }
Exemplo n.º 7
0
 /// <summary>
 /// IList.Contains
 /// </summary>
 /// <param name="addr"></param>
 /// <returns></returns>
 public virtual bool Contains(unsuccess_sme addr)
 {
     return(InnerList.Contains(addr));
 }