Ejemplo n.º 1
0
        public DefaultHeaders <TKey, TValue> Copy()
        {
            var copy = new DefaultHeaders <TKey, TValue>(this.hashingStrategy, this.ValueConverter, this.nameValidator, this.entries.Length);

            copy.AddImpl(this);
            return(copy);
        }
Ejemplo n.º 2
0
 public HeaderEnumerator(DefaultHeaders <TKey, TValue> headers)
 {
     this.head  = headers.head;
     this.size  = headers.size;
     this.node  = this.head;
     this.index = 0;
 }
Ejemplo n.º 3
0
            public ValueEnumerator(DefaultHeaders <TKey, TValue> headers, TKey name)
            {
                if (name == null)
                {
                    ThrowArgumentNullException(nameof(name));
                }

                this.hashingStrategy = headers.hashingStrategy;
                this.hash            = this.hashingStrategy.HashCode(name);
                this.name            = name;
                this.node            = this.head = headers.entries[headers.Index(this.hash)];
                this.current         = default(TValue);
            }