Class HttpParserBase<T>
A base class for the HttpResponseParser and HttpRequestParser classes. Not intended for direct use.
Inherited Members
Namespace: Rssdp.Infrastructure
Assembly: cs.temp.dll.dll
Syntax
public abstract class HttpParserBase<T>
where T : new()
Type Parameters
| Name | Description |
|---|---|
| T |
Methods
IsContentHeader(String)
Returns a boolean indicating whether the specified HTTP header name represents a content header (true), or a message header (false).
Declaration
protected abstract bool IsContentHeader(string headerName)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | headerName | A string containing the name of the header to return the type of. |
Returns
| Type | Description |
|---|---|
| System.Boolean |
Parse(T, Http.Headers.HttpHeaders, String)
Parses a string containing either an HTTP request or response into a
Declaration
protected virtual HttpContent Parse(T message, Http.Headers.HttpHeaders headers, string data)
Parameters
| Type | Name | Description |
|---|---|---|
| T | message | A |
| System.Net.Http.Headers.HttpHeaders | headers | A reference to the |
| System.String | data | A string containing the data to be parsed. |
Returns
| Type | Description |
|---|---|
| HttpContent | An |
Parse(String)
Parses the data provided into either a
Declaration
public abstract T Parse(string data)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | data | A string containing the HTTP message to parse. |
Returns
| Type | Description |
|---|---|
| T | Either a |
ParseHttpVersion(String)
Parses the HTTP version text from an HTTP request or response status line and returns a System.Version object representing the parsed values.
Declaration
protected static Version ParseHttpVersion(string versionData)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | versionData | A string containing the HTTP version, from the message status line. |
Returns
| Type | Description |
|---|---|
| System.Version | A System.Version object containing the parsed version data. |
ParseStatusLine(String, T)
Used to parse the first line of an HTTP request or response and assign the values to the appropriate properties on the message.
Declaration
protected abstract void ParseStatusLine(string data, T message)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | data | The first line of the HTTP message to be parsed. |
| T | message | Either a |