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); }
public HeaderEnumerator(DefaultHeaders <TKey, TValue> headers) { this.head = headers.head; this.size = headers.size; this.node = this.head; this.index = 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); }