/// <summary> /// This method adds our information to the byte stream. /// </summary> /// <param name="writer"></param> public void AddToStream(SmppWriter writer) { if (elem_ != null) { flag_.AddToStream(writer); ISupportSmppByteStream isb = (ISupportSmppByteStream)elem_; isb.AddToStream(writer); } }
/// <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); } }
/// <summary> /// This allows an object to serialize itself to the stream /// </summary> /// <param name="ob"></param> public void Add(ISupportSmppByteStream ob) { ob.AddToStream(this); }
/// <summary> /// This allows an object to serialize itself to the stream /// </summary> /// <param name="ob"></param> public void ReadObject(ISupportSmppByteStream ob) { ob.GetFromStream(this); }