Exemplo n.º 1
0
 private void IndexHeader(int index, AddHeaderDelegate addHeaderDelegate)
 {
     if (index <= StaticTable.Length)
     {
         HeaderField headerField = StaticTable.GetEntry(index);
         this.AddHeader(addHeaderDelegate, headerField.Name, headerField.Value, false);
     }
     else if (index - StaticTable.Length <= this.dynamicTable.Length())
     {
         HeaderField headerField = this.dynamicTable.GetEntry(index - StaticTable.Length);
         this.AddHeader(addHeaderDelegate, headerField.Name, headerField.Value, false);
     }
     else
     {
         throw new IOException("illegal index value (" + index + ")");
     }
 }
Exemplo n.º 2
0
 private void ReadName(int index)
 {
     if (index <= StaticTable.Length)
     {
         HeaderField headerField = StaticTable.GetEntry(index);
         name = headerField.Name;
     }
     else if (index - StaticTable.Length <= this.dynamicTable.Length())
     {
         HeaderField headerField = this.dynamicTable.GetEntry(index - StaticTable.Length);
         name = headerField.Name;
     }
     else
     {
         throw new IOException("illegal index value (" + index + ")");
     }
 }