HttpLinkedListNode Class

System.Net.Http

Represents a node in an HTTP header linked list.

Properties

Next HttpLinkedListNode<T> { get; }

Gets the next node in the linked list.

Previous HttpLinkedListNode<T> { get; }

Gets the previous node in the linked list.

Value T { get; set; }

Gets or sets the value contained in this node.

Constructors

HttpLinkedListNode(T value)

Initializes a new instance of the HttpLinkedListNode class with the specified value.

Parameters:
T value
The value to store in the node.

Methods

Dispose()

Releases all resources used by the current instance of the HttpLinkedListNode class.

Dispose(bool disposing)

Releases the unmanaged resources used by the specified object and, optionally, releases the managed resources.

Parameters:
bool disposing
True to release both managed and unmanaged resources; false to release only unmanaged resources.

Remarks

The HttpLinkedListNode class is an internal helper class used by the HttpRequestMessage.Headers and HttpResponseMessage.Headers collections to manage the order of HTTP headers.

Each node in the linked list holds a single header value and provides pointers to the previous and next nodes, forming a doubly linked list.

Example

// This is a conceptual example as HttpLinkedListNode is internal using System.Net.Http; public class Example { public static void Main() { var request = new HttpRequestMessage(); request.Headers.Add("Accept", "application/json"); request.Headers.Add("User-Agent", "MyClient/1.0"); // Internally, headers are managed using HttpLinkedListNode // For instance, to access the first added header: // var firstHeaderNode = request.Headers.First(); // Hypothetical access // Console.WriteLine(firstHeaderNode.Value); } }

Requirements

Implementable in File Line
.NET Framework 4.5, .NET Core 2.0, .NET Standard 2.0 Http.cs Line 500 (approx.)