Exemple #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);
        }
 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);            
 }