public UriPrefixTable(bool includePortInComparison, bool useWeakReferences)
 {
     this.includePortInComparison = includePortInComparison;
     this.useWeakReferences       = useWeakReferences;
     this.root        = new SegmentHierarchyNode <TItem>(null, useWeakReferences);
     this.lookupCache = new HopperCache(128, useWeakReferences);
 }
        private void AddToCache(BaseUriWithWildcard key, TItem item)
        {
            object              value;
            HopperCache         hopperCache         = this.lookupCache;
            BaseUriWithWildcard baseUriWithWildcard = key;
            TItem tItem = item;

            if (tItem != null)
            {
                value = tItem;
            }
            else
            {
                value = DBNull.Value;
            }
            hopperCache.Add(baseUriWithWildcard, value);
        }
 private void ClearCache()
 {
     this.lookupCache = new HopperCache(128, this.useWeakReferences);
 }