Esempio n. 1
0
        /// <summary> Called to add a new user data object to the buffer </summary>
        /// <param name="userData"></param>
        public void Add(UserData userData)
        {
            foreach (UserDataHeader userDataHeader in userData.Headers)
            {
                Headers.Add(userDataHeader);
            }

            _ShortMessage.AddRange(userData.ShortMessage);
        }
Esempio n. 2
0
        /// <summary> Called to add a user data object to the buffer </summary>
        /// <param name="userData"></param>
        public void AddUserData(UserData userData)
        {
            SmppBuffer tmpBuff = new SmppBuffer(DefaultEncoding);

            if (userData.Headers.Count > 0)
            {
                tmpBuff.AddUserDataHeaderCollection(userData.Headers);
            }

            if ((userData.ShortMessage != null) && (userData.ShortMessage.Length > 0))
            {
                tmpBuff.AddBytes(userData.ShortMessage);
            }

            AddByte(Convert.ToByte(tmpBuff.Length));
            AddSmppBuffer(tmpBuff);
        }
Esempio n. 3
0
 /// <summary> Constructor </summary>
 /// <param name="segmentsLeftToReceived"></param>
 public UserDataControl(int segmentsLeftToReceived)
 {
     SegmentsLeftToReceived = segmentsLeftToReceived;
     UserData = UserData.Create();
 }