Example #1
0
        public int CalculateSize()
        {
            int _total_size_ = 0;

            if (value != 0)
            {
                _total_size_ += 1 + ComputeSize.ComputeSInt32Size(value);
            }
            return(_total_size_);
        }
Example #2
0
        public int CalculateSize()
        {
            int _total_size_ = 0;

            if (value != null && value.Count != 0)
            {
                _total_size_ += 1;
                int local_pack_size = 0;
                for (int i = 0; i < value.Count; ++i)
                {
                    local_pack_size += ComputeSize.ComputeSInt32Size(value[i]);
                }
                _total_size_ += local_pack_size + ComputeSize.ComputeInt32Size(local_pack_size);
            }
            return(_total_size_);
        }
Example #3
0
 public void WriteTo(IWriteStream output)
 {
     if (value != null && value.Count != 0)
     {
         output.WriteRawTag(10);
         int _total_pack_size_ = 0;
         for (int i = 0; i < value.Count; ++i)
         {
             _total_pack_size_ += ComputeSize.ComputeSInt32Size(value[i]);
         }
         output.WriteInt32(_total_pack_size_);
         for (int i = 0; i < value.Count; ++i)
         {
             output.WriteSInt32(value[i]);
         }
     }
 }