HttpLifecycleHeaderValue Class

Namespace

System.Net.Http.Headers

Assembly

System.Net.Http.dll

Summary

Represents the value of the HTTP lifecycle header.

Remarks

This class provides a strongly-typed representation for the HTTP lifecycle header, which is used to convey information about the lifecycle of an HTTP connection.

The HttpLifecycleHeaderValue class is part of the .NET framework's handling of HTTP communication and allows for precise control and parsing of this specific header.

Constructors

Properties

Methods


HttpLifecycleHeaderValue()

public HttpLifecycleHeaderValue()

Summary

Creates a new instance of the HttpLifecycleHeaderValue class.

HttpLifecycleHeaderValue(string)

public HttpLifecycleHeaderValue(string rawValue)

Summary

Creates a new instance of the HttpLifecycleHeaderValue class with the specified raw value.

Parameters

rawValue
The raw string value to initialize the header with.

Value

public string Value { get; }

Summary

Gets the raw string value of the header.

Returns

A string representing the raw value of the HTTP lifecycle header.

Parse(string)

public static HttpLifecycleHeaderValue Parse(string value)

Summary

Parses a string representation of an HTTP lifecycle header value.

Parameters

value
The string to parse.

Returns

An instance of HttpLifecycleHeaderValue representing the parsed value.

TryParse(string, out HttpLifecycleHeaderValue)

public static bool TryParse(string value, out HttpLifecycleHeaderValue result)

Summary

Tries to parse a string representation of an HTTP lifecycle header value.

Parameters

value
The string to parse.

result
When this method returns, contains the parsed HttpLifecycleHeaderValue, or null if parsing failed.

Returns

true if the string was parsed successfully; otherwise, false.

ToString()

public override string ToString()

Summary

Converts the value of the current instance to its equivalent string representation.

Returns

A string representing the value of the HttpLifecycleHeaderValue.