Struct HeaderCollection.Enumerator
Walks first the unique-header dictionary's values, then each list in the non-unique-header
dictionary's values in turn - the same effective order as the previous
Concat(...SelectMany(...)) implementation - without allocating any LINQ iterator
objects. See the remarks on GetEnumerator() for why this is worth a hand-written
enumerator instead of the equivalent LINQ expression.
Inherited Members
Namespace: Titanium.Web.Proxy.Http
Assembly: Titanium.Web.Proxy.dll
Syntax
public struct HeaderCollection.Enumerator : IEnumerator<HttpHeader>, IEnumerator, IDisposable
Properties
| Edit this page View SourceCurrent
Gets the element in the collection at the current position of the enumerator.
Declaration
public readonly HttpHeader Current { get; }
Property Value
| Type | Description |
|---|---|
| HttpHeader | The element in the collection at the current position of the enumerator. |
Methods
| Edit this page View SourceDispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()
MoveNext()
Advances the enumerator to the next element of the collection.
Declaration
public bool MoveNext()
Returns
| Type | Description |
|---|---|
| bool | true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection. |
Exceptions
| Type | Condition |
|---|---|
| InvalidOperationException | The collection was modified after the enumerator was created. |
Reset()
Sets the enumerator to its initial position, which is before the first element in the collection.
Declaration
public void Reset()
Exceptions
| Type | Condition |
|---|---|
| InvalidOperationException | The collection was modified after the enumerator was created. |
| NotSupportedException | The enumerator does not support being reset. |