예제 #1
0
        /// <summary>
        /// create a map CharSequenceMap header name to index value to allow quick lookup
        /// </summary>
        static CharSequenceMap <int> CreateMap()
        {
            int length = StaticTable.Length;
            CharSequenceMap <int> ret = new CharSequenceMap <int>(true, UnsupportedValueConverter <int> .Instance, length);

            // Iterate through the static table in reverse order to
            // save the smallest index for a given name in the map.
            for (int index = length; index > 0; index--)
            {
                HpackHeaderField entry = GetEntry(index);
                ICharSequence    name  = entry._name;
                _ = ret.Set(name, index);
            }

            return(ret);
        }