Esempio n. 1
0
        /// <summary>
        /// This method retrieves the C-Octet string from the byte stream
        /// </summary>
        /// <param name="reader">Byte stream</param>
        public void GetFromStream(SmppReader reader)
        {
            flag_.GetFromStream(reader);
            switch (flag_.Value)
            {
            case DestinationType.DL_NAME:
                elem_ = new dl_name();
                break;

            case DestinationType.SME_ADDRESS:
                elem_ = new address();
                break;

            default:
                elem_ = null;
                break;
            }

            if (elem_ != null)
            {
                ISupportSmppByteStream isb = (ISupportSmppByteStream)elem_;
                isb.GetFromStream(reader);
            }
        }
Esempio n. 2
0
 /// <summary>
 /// This allows an object to serialize itself to the stream
 /// </summary>
 /// <param name="ob"></param>
 public void ReadObject(ISupportSmppByteStream ob)
 {
     ob.GetFromStream(this);
 }