Exemple #1
0
        public byte[] ToByteArray()
        {
            var builder = new ByteBuilder(100);

            if (Items != null)
            {
                foreach (Tag tag in Items)
                {
                    builder.AddRange(SmppConverter.FromInt16ToByteArray(tag.TagId));
                    builder.AddRange(SmppConverter.FromInt16ToByteArray(tag.Length));
                    builder.AddRange(tag.GetByteArray());
                }
            }
            return(builder.ToArray());
        }
Exemple #2
0
 public void SetInt16(short value)
 {
     _Value = SmppConverter.FromInt16ToByteArray(value);
 }