示例#1
0
        public void Process(byte[] buffer, int offset)
        {
            SynchronizationSource = Utils.ConvertBytesToString(buffer, offset, 4);
            Items = new Collection <SourceDescriptionItem>();
            int  index = 4;
            bool done  = false;

            do
            {
                SourceDescriptionItem item = new SourceDescriptionItem();
                item.Process(buffer, offset + index);

                if (item.Type != 0)
                {
                    Items.Add(item);
                    index       += item.ItemLength;
                    blockLength += item.ItemLength;
                }
                else
                {
                    blockLength++;
                    done = true;
                }
            }while (!done);
        }
示例#2
0
 public void Process(byte[] buffer, int offset)
 {
     SynchronizationSource = Utils.ConvertBytesToString(buffer, offset, 4);
     Items = new Collection<SourceDescriptionItem>();
     int index = 4;
     bool done = false;
     do
     {
         SourceDescriptionItem item = new SourceDescriptionItem();
         item.Process(buffer, offset + index);
         
         if (item.Type != 0)
         {
             Items.Add(item);
             index += item.ItemLength;                    
             blockLength += item.ItemLength;
         }
         else
         {
             blockLength++;
             done = true;
         }
     }
     while (!done);            
 }